[R] BY GROUP IN GEV
Peter Maclean
pmaclean2011 at yahoo.com
Thu Jun 23 01:06:18 CEST 2011
I am trying to run gev (general extreme value) function in “evir” package. My
data is divided by state. I am using the following codes but it is not working.
I will appreciate any help.
#Split data
MAS <- split(MA, MA$states)
CP <- lapply(MAS, function(x){gev(MAS$CP1, 100, method = "BFGS", control =
list(maxit = 500))})
the Error message is:
Error in tapply(data, grouping, max) : arguments must have same length
I know there are also “by” function, but I could not figure it out how to use
it.
More information about the R-help
mailing list