Error in unique.default(x) : unique() applies only to vectors

Viewed 274

I am using the following code to create a summary table to create a heatamp

daymonth <- ddply(DF, c( "month", "day" ), summarize,
                   N    = length(date)
)

This was working earlier but my r crashed and when I loaded it back up I am getting the following error: Error in unique.default(x) : unique() applies only to vectors

Any ideas on how to resolve this?

1 Answers

We could use dplyr

library(dplyr)
DF %>% 
      count(month, day)
Related