I have 2 dataframes, each with 5 columns and 20 rows. They are called data1 and data2.I wish to create a third dataframe called data3, also with 5 columns and 20 rows.
I want data3 to contains the values in data1 when the value in data1 is not NA. Otherwise it should contain the values in data2. I have tried afew methids, but they do not seem to work as intended.: data3<-ifelse(is.na(data1)=F,data1,data2) and data3[,]<-ifelse(is.na(data1[,])=F,data1[,],data2[,]) Please suggest the best way. ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
