help-boun...@r-project.org [mailto:r-help-boun...@r-
>> project.org] On Behalf Of Philipp Schmidt
>> Sent: Friday, May 15, 2009 8:35 AM
>> To: Romain Francois
>> Cc: r-help@r-project.org
>> Subject: Re: [R] creating and then executing command strings
>>
&
.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Philipp Schmidt
> Sent: Friday, May 15, 2009 8:35 AM
> To: Romain Francois
> Cc: r-help@r-project.org
> Subject: Re: [R] creating and then executing command strings
>
> On Fri, May 15, 2009 at 3:38 PM, Romain Francois
&
On Fri, May 15, 2009 at 3:38 PM, Romain Francois
wrote:
> Hi,
>
> You can either parse and eval the string you are making, as in:
>
> eval( parse( text = paste("avg_",colname, " <- 0;", sep='') ) )
>
>
> Or you can do something like this:
>
> df[[ paste( "avg_", colname, sep = "" ) ]] <- 0
>
Than
Hi,
You can either parse and eval the string you are making, as in:
eval( parse( text = paste("avg_",colname, " <- 0;", sep='') ) )
Or you can do something like this:
df[[ paste( "avg_", colname, sep = "" ) ]] <- 0
Romain
Philipp Schmidt wrote:
Hi:
I very recently started experimenting wi
4 matches
Mail list logo