0

In R4.1.2 How can move cells from V2 column to V1 column (IF V1 has empty cell) (move A3 to column v1)

V1  V2  V3
A1  NA  C1
A2  NA  C2
NA  A3  C3
A4  NA  C4
A5  NA  C5
A6  NA  C6
A7  NA  C7
A8  NA  C8

my target is

V1  V2  V3
A1  NA  C1
A2  NA  C2
A3  NA  C3
A4  NA  C4
A5  NA  C5
A6  NA  C6
A7  NA  C7
A8  NA  C8
  • With "move" you mean replacing NAs in either `name` or `name2` with Non-NAs from the other column? – stefan Jan 03 '22 at 11:03
  • 4
    Does this answer your question? [Coalesce two string columns with alternating missing values to one](https://stackoverflow.com/questions/27850344/coalesce-two-string-columns-with-alternating-missing-values-to-one) – Maël Jan 03 '22 at 11:08

0 Answers0