apr may june july aug sep oct nov dec
5.65 3.85 4.50 5.50 5.30 1.80 2.35 6.50 5.35 2.20 5.95 4.40
Bill Venables.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of pelt
Sent: Thursday, 17 March 2011 12:28 AM
To: r-help@r-project
Try this:
reshape(dum, direction = 'long', idvar = 'date', varying =
list(c('col1', 'col2')))
On Wed, Mar 16, 2011 at 11:28 AM, pelt wrote:
> Dear all,
>
> I have a dataframe which looks like this (dummy):
>
> date<-c("jan", "feb", "mar", "apr", "may", "june", "july",
> "aug","sep","oct","nov","
require(reshape2)
melt(dum, id = 1)
On Wednesday, March 16, 2011 at 9:28 AM, pelt wrote:
Dear all,
>
> I have a dataframe which looks like this (dummy):
>
> date<-c("jan", "feb", "mar", "apr", "may", "june", "july",
> "aug","sep","oct","nov","dec")
> col1<-c(8.2,5.4,4.3,4.1,3.1,2.5,1.1,4.5,3.2,1
Dear all,
I have a dataframe which looks like this (dummy):
date<-c("jan", "feb", "mar", "apr", "may", "june", "july",
"aug","sep","oct","nov","dec")
col1<-c(8.2,5.4,4.3,4.1,3.1,2.5,1.1,4.5,3.2,1.9,7.8,6.5)
col2<-c(3.1,2.3,4.7,6.9,7.5,1.1,3.6,8.5,7.5,2.5,4.1,2.3)
dum<-data.frame(cbind(date,col
4 matches
Mail list logo