Top "Mapply" questions

R function that applies a function to multiple lists or vector arguments.

R data.table apply function to rows using columns as arguments

I have the following data.table x = structure(list(f1 = 1:3, f2 = 3:5), .Names = c("f1", "f2"), row.names = c(NA, -3…

r data.table mapply
Applying a function to two lists?

To find the row-wise correlation of two matrices X and Y, the output should have a correlation value for row 1 …

r parameter-passing apply mapply
R: apply a function to every element of two variables respectively

I have a function with two variables x and y: fun1 <- function(x,y) { z <- x+…

r apply mapply multiple-arguments
Remove NAs when using mapply for ttest in R

I would like to do a column-wise ttest between two dataframes in R. That is, ttest(df1$col1,df2$col1) ,…

r mapply na.rm
remove multiple patterns from text vector r

I want to remove multiple patterns from multiple character vectors. Currently I am going: a.vector <- gsub("@\\w+", "", …

r vector gsub mapply