[R] Conditional replacement and removal of data frame values

2015-08-31 Thread Luigi Marongiu
Dear all, I have a data frame and I would like to do the following: a) replace value of one variable "a" according to the value of another one "b" b) remove all the instances of the variable "b" For the sake of argument, let's say I have the following data frame: test <- rep(c("Adenovirus",

Re: [R] Conditional replacement and removal of data frame values

2015-08-31 Thread David Winsemius
On Aug 31, 2015, at 1:49 PM, Luigi Marongiu wrote: > Dear all, > I have a data frame and I would like to do the following: > a) replace value of one variable "a" according to the value of another one "b" > b) remove all the instances of the variable "b" > > For the sake of argument, let's say I