meaning of ddply error: ‘names’ attribute [9] must be the same length as the vector [1]

I fixed this problem I was having by converting format from POSIXlt to POSIXct as Hadley suggests above – one line of code: mydata$datetime<-strptime(mydata$datetime, “%Y-%m-%d %H:%M:%S”) # original conversion from datetime string : > class(mydata$datetime) [1] “POSIXlt” “POSIXt” mydata$datetime<-as.POSIXct(mydata$datetime) # convert to POSIXct to use in data frames / ddply

Get the means of sub groups of means in R

With base, using aggregate > aggregate(WLN~GROUP+WORD, mean, data=df) GROUP WORD WLN 1 1 1 3.333333 2 1 2 2.333333 3 2 3 1.333333 4 2 4 1.000000 where df is @Metrics’ data. Another alternative is using summaryBy from doBy package > library(doBy) > summaryBy(WLN~GROUP+WORD, FUN=mean, data=df) GROUP WORD WLN.mean 1 1 1 3.333333 2 1 … Read more