On Jan 28, 2014, at 3:43 PM, Dennis Murphy wrote:
> David:
>
> I privately suggested he post to manipulatr because Hadley is more
> likely to see his question there first than in R-help. He originally
> posted here, noted the cross-posting and referral at manipulatr and
> responded back to this
David:
I privately suggested he post to manipulatr because Hadley is more
likely to see his question there first than in R-help. He originally
posted here, noted the cross-posting and referral at manipulatr and
responded back to this list when he got a successful reply from
Hadley. I don't see tha
On Jan 27, 2014, at 7:45 AM, Bos, Roger wrote:
> All,
>
> I would like to figure out how to pass variable names to the dplyr function
> mutate. For example, this works because hp is one of the variable names on
> mtcars:
>
> mutate(mtcars, scale(hp))
>
> Let's says I want to pass in the tar
essage-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Monday, January 27, 2014 5:25 PM
To: Bos, Roger
Subject: Re: [R] passing variable names to dplyr
Hi Roger,
This works on library(plyr), but not in dplyr.
target <- "hp"
res2 <- plyr:::mutate(mtcars,hp1= eval(parse(tex
All,
I would like to figure out how to pass variable names to the dplyr function
mutate. For example, this works because hp is one of the variable names on
mtcars:
mutate(mtcars, scale(hp))
Let's says I want to pass in the target variable instead of hard-coding the
name, as follows:
target
5 matches
Mail list logo