edwindj / ffbase

Basic (statistical) functionality for R package ff
github.com/edwindj/ffbase/wiki
35 stars 15 forks source link

Having a period (.) in a table column name prevents merge and and ffdfdply from working #38

Open thequackdaddy opened 10 years ago

thequackdaddy commented 10 years ago

I'm running an ffdfdply operation. Something like this...

TrainingData<-ffdfdply(x=TrainingData,split=TrainingData$id,
FUN=function(x) {x$Predicted<-predict(Model,newdata=x, type="vector")
x$Segment<-predict(Model2, newdata=x)
x})

Turns out that I have periods (.) in my column names. That makes ffdfdply (and some other things like merge.ffdf) error out and give this message.

Error: is.null(names(x)) is not TRUE
jwijffels commented 10 years ago

Do you have a reproducible example of this?

edwindj commented 10 years ago

As a side note: working on ffbase2 (see http://github.com/edwindj/ffbase2). Your code would translate to:

TrainingData <-
  TrainingData %>%
  group_by(id) %>%
  do( Predicted = predict(Model, newdata=., type="vector")
    , Segment  = predict(Model2, newdata=.)
    )