I am trying to run
data = aaply(laply(datlist, as.matrix), c(2,3), mean)
using plyr package and noticed that the result is returned in different format when the code is running from console vs. Rmd chunk.
The code runs fine in console- it returns a matrix while the code returns a list when running from Rmd.
I tried to specify plyr package by adding
plyr:: before both aaply and laply but to no avail. Is there a workaround to this issue?