Re: [R] count by value

2013-04-10 Thread Rui Barradas
Hello, Any of the two lapply intructions will give what you want. The difference is in the definition of "decade". In the first case, it's ten years starting 1592. So the first decade are the 10 years 1592, 1593, ..., 1601, the second decade are the 10 years 1602, ..., 1611, etc. In the second

Re: [R] count by value

2013-04-10 Thread David Winsemius
On Apr 9, 2013, at 11:45 AM, catalin roibu wrote: Hello all! I have a big problem now. I want a data frame like this: dput(head(test,100)) structure(c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,

Re: [R] count by value

2013-04-10 Thread Jim Lemon
On 04/10/2013 04:45 AM, catalin roibu wrote: Hello all! I have a big problem now. I want a data frame like this: dput(head(test,100)) > ... Now I want to group rownames (in this case year) in 10 years classes and I want to count for each 10 years classe (decade) the number of major and minor ev

[R] count by value

2013-04-09 Thread catalin roibu
Hello all! I have a big problem now. I want a data frame like this: dput(head(test,100)) structure(c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA