library(reshape)
names(harvest.dat) = c("CROP_ID", "CROPTYPE", "PERIOD","CUT_AGE")
harvest <-cast(harvest.dat, CROP_ID + CROPTYPE ~ PERIOD)
It seems that I am getting the frequencies instead of the individual values.
Output
~
CROP_ID CROPTYPE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Schalk,
Thank you very much for this.
Noli
On 1/5/10, Schalk Heunis wrote:
> Hi
>
> You can use the reshape package to achieve this. If you don't have it
> installed, install.packages('reshape'). Then look at ?cast and (possibly)
> ?melt
> HTH!
>
> Schalk
>
>
> On Tue, Jan 5, 2010 at 7:59 AM
Hi
You can use the reshape package to achieve this. If you don't have it
installed, install.packages('reshape'). Then look at ?cast and (possibly)
?melt
HTH!
Schalk
On Tue, Jan 5, 2010 at 7:59 AM, Noli Sicad wrote:
> Hi,
>
> I need to transpose and aggregate the 4th and 5th column of this d
Sorry, the second email is accidently sent. Yes, the Cut Area should
not be included in the data in the first email. The second email has
a correct data.
Thanks. Noli
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLE
> From:
> P_ID CROP Period Ini_Age
CROP_ID CROPTYPEPeriod Ini_Age
83 SORI 131
84 SORI1 32
85 SORI 1 33
86 SORI 1 34
82 SORI 2 28
83 SORI 2 29
84 SORI 2 30
93 SORM2 35
62
Hi,
I need to transpose and aggregate the 4th and 5th column of this data
set (below). The period is 1 to 100 years and some period has 1 entry
as shown in the example below.
Any ideas how to do this. Thanks in advance.
Noli
~~
From:
P_ID CROP Period Ini_Age Area_Cut
83 SORI
6 matches
Mail list logo