is there an "apply" application for this instead of double-looping across each row of two data frames in base R (without using packages)?
listD <- matrix(1:6, ncol=2)
listD <- split(listD,seq(NROW(listD)))
df1 <- data.frame(x=c(1,2), y=c(3,4))
df2 <- data.frame(x=c(3,2), y=c(1,1))
testFunc <- function(a, b, c) a * (b + c)
for (j in 1:nrow(df1)) {
for (s in 1:nrow(df2)) {
print(lapply(listD, FUN= testFunc, b=df1[j,], c=df2[s,]))
}
}
Thank you!