Displaying 1 result from an estimated 1 matches for "end_of_the_loc".
2010 Jul 28
1
error: arguments imply differing number
...tion(x) {max(x$item_values)})
my.summary <- function(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 r...