简体   繁体   中英

Using apply function with ff package in R

I am trying to apply a given function to the columns in a "as.ffdf" object but I haven't had any luck. Can anyone provide suggestions to the below? n = 3711 and myProbDensity has dimensions of 95248 rows and 3711 columns.

myDF <- as.ffdf(myProbDensity)
test <- ff(vmode = "double", dim = c(1, n))
test <- apply(myDF, MARGIN = 2, FUN = function(x)
                                   myQuantileFun(x = as, ex = myDF,
                                                 h = 0.001)

When executing the above code I get "you can only change the fastest rotating dim". I'm not really sure what this means. Also the myQuantileFun function returns a function and not a value (I'm not sure if this makes a difference). Any help would be great.

代替apply(myDF,...)尝试apply(myDF[,],...)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM