No. As Arun pointed OP wants melt but with some result polishing.
Petr
> -Original Message-
> From: JiHO [mailto:jo.li...@gmail.com]
> Sent: Friday, February 28, 2014 6:04 PM
> To: PIKAL Petr
> Cc: dila radi; r-help@r-project.org
> Subject: Re: [R] Data Rearrangemen
HI Dila,
You have to order it afterwards.
res <-
transform(melt(dat,id.var=c("Year","Day")),Month=match(variable,month.abb),Amount=value)[,-c(3:4)]
res1 <- res[with(res,order(Year,Month,Day)),]
A.K.
On Friday, February 28, 2014 2:16 AM, dila radi wrote:
Dear Arun,
Thank you so much for yo
request?
>
> Petr
>
> From: dila radi [mailto:dilarad...@gmail.com]
> Sent: Friday, February 28, 2014 9:25 AM
> To: PIKAL Petr
> Subject: Re: [R] Data Rearrangement
>
> Dear Petr,
>
> Im so sorry for the inconvenience caused by the data.
>
> I want to rearrange the dat
Hi
Did you try what I had suggested? In what aspect it does not fulfil your
request?
Petr
From: dila radi [mailto:dilarad...@gmail.com]
Sent: Friday, February 28, 2014 9:25 AM
To: PIKAL Petr
Subject: Re: [R] Data Rearrangement
Dear Petr,
Im so sorry for the inconvenience caused by the data
roject.org] On Behalf Of dila radi
> Sent: Friday, February 28, 2014 4:25 AM
> To: r-help@r-project.org
> Subject: [R] Data Rearrangement
>
> Hi all,
>
> I know this is easy, but I really do not have any idea to solve it.
>
> I have this kind of data set:
>
> dat <-
On Feb 27, 2014, at 7:24 PM, dila radi wrote:
> Hi all,
>
> I know this is easy, but I really do not have any idea to solve it.
>
> I have this kind of data set:
>
> dat <- read.table(text="Day Year Jan Feb Mar Apr
> 1 2012 0 2.5 0.5 2
> 2 2012 0 6.5 0 29
> 3 2012 0 9.5 0 0
> 4 2012 0
Hi all,
I know this is easy, but I really do not have any idea to solve it.
I have this kind of data set:
dat <- read.table(text="Day Year Jan Feb Mar Apr
1 2012 0 2.5 0.5 2
2 2012 0 6.5 0 29
3 2012 0 9.5 0 0
4 2012 0 0 8 0.5
5 2012 0 5 0.5 110.5
6 2012 0 4 3.5 22
7 2012 11
7 matches
Mail list logo