As an extension to the problem I posted in the following link,
Issue with pasting 5 columns groups in R
I have a table like below now.
Table:
V29 V30 V31 V32 V33 V34 V35 V36 V37 V38
044 N 006 E 011 044 N 006 E 012
045 N 007 E 028 NA NA NA NA NA
I want to obtain the following table, each row paste in 5 column groups. But, remove NA column when pasting.
Output:
V29 V30 V31 V32 V33 V34 V35 V36 V37 V38 output
044 N 006 E 011 044 N 006 E 012 044N006E011-044N006E012
045 N 007 E 028 NA NA NA NA NA 045N007E028
Highly appreciate any help.
Thanks.