I have to get the final data frame using ddply of the package plyr. Here is the code:
POI_instances = ddply(.data = POI_proximity, .variables = c("owner","deviceid","date"), .fun = function(df){data.frame(min_time = min(df$loc_ts),max_time = max(df$loc_ts))})
Basically, I am trying to subset the given data frame "POI_proximity" into the final data set "POI_instances" by applying function given in the third argument.
But I am getting the error:
R Error in unique.default(x) : unique() applies only to vectors
I did tried already asked but didn't get the solution. Any Help Possible?