Hi R users, I'm trying to manipulate dataset, but met some difficulties.
df year month flow 2006 3 3.5 2006 4 3.8 2006 5 21 2006 6 32 2007 3 4.1 2007 4 4.4 ... I want to calculate total flow for each year, and use the code below: aggregate(flow~year, data=df, sum) But it gave the error message: Error in get(as.character(FUN), mode = "function", envir = envir) : object 'FUN' of mode 'function' was not found What is the problem and how to solve it? Thanks for your help. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.