search for: tp3454646p3454704

Displaying 1 result from an estimated 1 matches for "tp3454646p3454704".

2011 Apr 16
3
if else statements in data frame
Dear R experts, I have again a problem. Let I have a data frame like below: x y ---------- A A A B B B A B where x and y are the column names. I want to create a new column z where it is elements will be like that, if at each row has there at least one 'B', then z will have value of B, if not then Z will have missing value(NA) for the corresponding row. So my result data frame should be