Displaying 1 result from an estimated 1 matches for "ali4".
Did you mean:
ali
2001 Mar 22
1
two easy questions...
...e.g.
glm(resp~from PC1 to PC10, PC15, etc.,...)
is there a faster way than simply writing each variable name in the formula?
2) Again, I have a dataframe, say ali.df, with tha following variables: ali1, ali2, ...ali78
I want to sum, for example, ali1+al2+ali7+f rom ali10 to ali20 etc., then from ali4 to ali8, etc. and then put everything in a new dataframe
I'd do somthing like:
new.df <- cbind(apply(ali.df[c(1:2,7,10:20)],1,sum), apply(ali.df[4:8],1,sum)) and so on.
Is it the right and only way?
Thanks in advance (and forgive my orrible english...)
Stefano
-.-.-.-.-.-.-.-.-.-.-....