Thank you Marc, that was an elegant solution, works perfectly!
Martin
On 9/21/2010 10:24 PM, Marc Schwartz wrote:
DF[, -c(1:2)]<- DF[, -c(1:2)] * DF$Group
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do re
On Sep 21, 2010, at 3:00 PM, Martin Tomko wrote:
> I am sure there is a simple solution to this... I have a column in a data
> frame specifying a grouping (1, -1) for my observations, and need to mutliply
> each observation in all the other columns of the data frame by the
> corresponding value
I am sure there is a simple solution to this... I have a column in a
data frame specifying a grouping (1, -1) for my observations, and need
to mutliply each observation in all the other columns of the data frame
by the corresponding value in the given column. I played with apply, and
saw some s
3 matches
Mail list logo