title: Creating a new variable in R from two existing ones
body: <p>My apologies if this is a basic question. I'm new to R.</p>
  
  <p>I have a dataset, DAT, which has 3 variables: ID, V1 and V2. Unfortunately, V2 data are missing for many cases. I want to create a new variable, V3. I want V3 to have the same values as V2, but for any case that has a missing value for V2, I want V3 to take the value of V1 instead. What is the most efficient way to do this in R?</p>