Ligges <[EMAIL PROTECTED]>
wrote:
> Example:
>
> myfunction <- function(mydata, myvariables, prefix="norm_"){
>newnames <- paste(prefix, myvariables, sep="")
> mydata[newnames] <- scale(mydata[myvariables])
>mydata
> }
&g
Hi. I'm a new R user and think what I'm trying to do is pretty basic, but
haven't been able to find the answer in the mailing list archives. How do I
write a function that creates new variables in a given data.frame with a
prefix attached to the variable names? I do a lot of repetitive logging a
2 matches
Mail list logo