1

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.

  • 1
    Can you make the question reproducible? Some dummy data, a silly function that does more or less nothing... See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example for some tips on how to do that. – Roman Luštrik Jul 07 '15 at 08:17

1 Answers1

-1

Instead of apply(myDF,...) try apply(myDF[,],...)

HywelMJ
  • 332
  • 2
  • 7