Displaying 1 result from an estimated 1 matches for "peak_valu".
Did you mean:
peak_value
2010 Jul 28
1
error: arguments imply differing number
...ction(x) {
start.loc <- x$location[which(x$start == TRUE)]
end.loc <- x$location[which(x$end == TRUE)]
peak <- max(x$item_values)
output <- data.frame(
start_of_the_location = start.loc,
end_of_the_location = end.loc,
peak_value = peak)
return(output)
}
ddply(mydata[, -1], .(runNumber,cat1), my.summary)
why ddply returned the following error
Error in data.frame(start_of_the_location = start.loc, end_of_the_location
= end.loc, :
arguments imply differing number of rows: 0, 1
> mydata[,-1]
cat1 location item_...