Displaying 1 result from an estimated 1 matches for "listofavar".
Did you mean:
listofvar
2002 Mar 05
1
apply question
Sorry to bother the list with another apply question, but I am having
trouble getting my mind around the various apply forms. A simplified
version of my problem is the following:
data _
data.frame(ct=seq(1,10),a1=rnorm(10),a2=rnorm(10),a3=rnorm(10),b=rnorm(10))
listofAvars _ grep('^a',names(data),value=T)
I would like a1, a2, a3 to be multiplied by 10. That is, I would like a
cleaner way of specifying the following:
a1 <- a1*10
a2 <- a2*10
a3 <- a3*10
As I mentioned, this is a simplified version of a larger variables list
and slightly more compli...