Re: [R] Combine factorial column intp a new column

2014-05-22 Thread arun
Hi, May be this helps:  ddNew <-  transform(dd_1, CLASS= gsub("NA-|-NA","",paste(Class_a, Class_b, sep="-")))  identical(ddNew, dd_2) #[1] TRUE A.K. On Thursday, May 22, 2014 4:07 AM, Beatriz R. Gonzalez Dominguez wrote: Dear R-users, I'd be very greatful if you could help me with the follo

[R] Combine factorial column intp a new column

2014-05-22 Thread Beatriz R. Gonzalez Dominguez
Dear R-users, I'd be very greatful if you could help me with the following as after a few tests I haven't still been able to get the right outcome. I've got this data: dd_1 <- data.frame(ID = c("1","2", "3", "4", "5"), Class_a = c("a",NA, "a", NA, NA), Class_b