I have some columns in R and for each row there will only ever be a value in one of them, the rest will be NA\'s. I want to combine these into one column with the non-NA val
You can use unlist to turn the columns into one vector. Afterwards, na.omit can be used to remove the NAs.
unlist
na.omit
NA
cbind(data[1], mycol = na.omit(unlist(data[-1]))) a mycol x1 A 1 x2 B 2 y3 C 3 z4 D 4 z5 E 5