om: ba...@exeter.ac.uk
> Sent: Fri, 3 Apr 2009 11:02:31 +0100
> To: bearmarketsr...@inbox.com
> Subject: Re: [R] Help pasting string as object name
>
> Hi,
>
> Is this what you want?
>
> d <- data.frame(density.AL = seq(1, 10),
> density.AK = seq(1, 10), # m
Hi,
Is this what you want?
d <- data.frame(density.AL = seq(1, 10),
density.AK = seq(1, 10), # many others...
Date=letters[1:10]) # dummy example
library(reshape)
melt(subset(d, Date == "b"), id="Date")
BTW, I spotted a few awkward things in your code,
st <- c("AL",
I have a data frame containing monthly observations of the 'density' of each US
state, recorded in variables named "density.AL", "density.AK", "density.AZ",
and so on for all 50 states. The data frame (called d) also contains a variable
called "Date" which is encoded as a string in the format "J
3 matches
Mail list logo