I have 2 columns for weight. There are NAs in each column but not for the same observation. Some observations have values for both. I would want to prioritize the WT2 values so I would like to do the following:
>From this: ID WT1 WT2 1 134 NA 2 145 155 1 NA 175 3 NA 187 To this: ID WT1 WT2 WT 1 NA 175 175 2 145 155 155 3 NA 187 187 Populating the NA values of wt2 with those of wt1 would work as well. Any suggestions would be greatly appreciated. -- Holly Shakya Doctoral Student San Diego State University/University of California, San Diego Joint Doctoral Program in Public Health (Global Health) [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.