A row shift a column to the right:
col1 col2 col3 col4 col5
1 A A A A
2 B B B B
3 NA C C C C
4 D D D D
How can I move C back to its proper place?
I have tried the following but with no luck:
nc <- ncol(df)
df[3, 1:nc] <- df[3, 2:(nc-1)]