Re: [R] subset handling

2012-12-18 Thread eliza botto
Dear Rui, thankyou very much. it really worked. extremly sorry for telling you a bit late as i was on the move. eliza Date: Tue, 18 Dec 2012 00:44:44 + From: ruipbarra...@sapo.pt To: eliza_bo...@hotmail.com CC: r-help@r-project.org Subject: Re: [R] subset handling Hello, You could

Re: [R] subset handling

2012-12-17 Thread Rui Barradas
Hello, You could have attached the output of dput(), it's much, much better. I have tried the following and it works. sp <- lapply(split(agg, agg$st), function(x) x[order(x$year, x$month), ]) sp <- lapply(sp, function(x) data.frame(year = x$year + x$month/12, Population = x$Population)) # Plot i

[R] subset handling

2012-12-17 Thread eliza botto
Dear Rui and UseRs,[a text file has also been attached, in case the format of my email is difficult to get]I am extremely sorry that I am bothering you once again, but I’ll have to get to the bottom of it. The following command sp <- lapply(split(agg, agg$st), function(x) x[order(x$year, x$mont