Possible Duplicate:
R: += and ++ equivalent from c++/c#/java, etc.?
Does R (specifically a data.frame
) have a version of the += operator? I would like to say:
my.df[foo > 50,"foo"] -= 10
But the best I can come up with so far is:
my.df[foo > 50,"foo"] <- my.df[foo > 50,"foo"] - 10
Any help appreciated.