4 7 13
#2 11 9 16
A.K.
- Original Message -
From: Rich Shepard
To: r-help@r-project.org
Cc:
Sent: Wednesday, December 5, 2012 4:23 PM
Subject: Re: [R] Changing data frame column headings
On Wed, 5 Dec 2012, R. Michael Weylandt wrote:
> Can you be more explicit about your problem?
Mi
Hi Rich,
You can get ?rename() by either loading library(reshape) or library(plyr).
A.K.
- Original Message -
From: Rich Shepard
To: R help
Cc:
Sent: Wednesday, December 5, 2012 4:24 PM
Subject: Re: [R] Changing data frame column headings
On Wed, 5 Dec 2012, arun wrote:
> I am
On Wed, 5 Dec 2012, David L Carlson wrote:
names(a) <- gsub("_quant", "", names(a))
a
David,
I did not pick that up from the names() help page. Thanks for the insight.
Rich
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listin
On Wed, 5 Dec 2012, arun wrote:
You can get ?rename() by either loading library(reshape) or library(plyr).
A.K.
I wondered about that, but assumed that reshape functions would also be
found in reshape2. I now know that's not the case. :-)
Much appreciated,
Rich
__
Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Rich Shepard
> Sent: Wednesday, December 05, 2012 3:25 PM
> To: R help
> Subject: Re: [R] Changing data frame column headings
>
> On Wed, 5 Dec 2012, arun wrote:
>
&
On Wed, Dec 5, 2012 at 9:23 PM, Rich Shepard wrote:
> On Wed, 5 Dec 2012, R. Michael Weylandt wrote:
>
>> Can you be more explicit about your problem?
>
>
> Michael,
>
> Data frame contains water chemistry data; site, date, parameter, value.
> The column names after dcast() are, for example, alk
On Wed, 5 Dec 2012, arun wrote:
I am not sure why ?rename() is not working.
a <- list(a = 1, b = 2, c = 3)
rename(a, c(b = "a", c = "b", a="c"))
I have the reshape2 library loaded and ?rename did not find the help page.
Are the parentheses required in the command?
Thanks,
Rich
_
On Wed, 5 Dec 2012, R. Michael Weylandt wrote:
Can you be more explicit about your problem?
Michael,
Data frame contains water chemistry data; site, date, parameter, value.
The column names after dcast() are, for example, alk_quant, ph_quant,
tds_quant. I wanted to remove the '_quant' from
Hi,
I am not sure why ?rename() is not working.
a <- list(a = 1, b = 2, c = 3)
rename(a, c(b = "a", c = "b", a="c"))
A.K.
- Original Message -
From: Rich Shepard
To: r-help@r-project.org
Cc:
Sent: Wednesday, December 5, 2012 1:51 PM
Subjec
x <- data.frame(a = 1:5, b = rnorm(5))
names(x) <- LETTERS[2:1]
print(x)
seems to work.
Can you be more explicit about your problem?
Michael
On Wed, Dec 5, 2012 at 6:51 PM, Rich Shepard wrote:
> I have a reshaped data frame with value column headings concatenated from
> two column headings
I have a reshaped data frame with value column headings concatenated from
two column headings in the melted data frame. I want to change all 56
headings in a single command, but 'names' allows me to change only one at a
time. In Hadley's 2007 article on reshape in the Journal of Statistical
Soft
11 matches
Mail list logo