I would like to apply a function over several matrices and the output should be list or vector reporting the result of each operation.
so my attemp was with mapply and looked like this:
myfunction<-function(x){cor(df1,x)
output.list<-mapply(myfunction(df2,df3))
but this didn’t work out. Any ideas??
Try this
lapply(list(df2, df3), myfunction).