I´m working with a complex matrix (complex to me...)
It is something like this:
Invoice.1 Invoice.2 Invoice.3 mtime
1 21605000182 21605000183 NA 2017-01-16 19:51:33
2 21605000182 21605000183 NA 2017-01-16 19:51:33
3 21605000182 21605000183 NA 2017-01-16 19:51:33
4 21605000182 21605000183 NA 2017-01-16 19:51:33
5 21510000669 21602000125 21608000366 2017-01-20 13:28:36
6 21609000856 NA NA 2017-01-20 13:28:36
7 21606000405 21608000354 21608000356 2017-01-20 13:28:36
8 21610000133 NA NA 2017-01-20 13:28:36
9 21604000592 21605000604 21605000608 2017-01-20 13:28:36
10 21609001012 NA NA 2017-01-20 13:28:36
I would like to convert all the Invoice columns to one, in order to clean up the "NA" and duplicated, but respecting the match of each one with the date of the last columns, which is the date of the claiming.
Something like that:
Invoice mtime
1 21605000182 2017-01-16 19:51:33
2 21605000182 2017-01-16 19:51:33
3 21605000182 2017-01-16 19:51:33
4 21605000182 2017-01-16 19:51:33
5 21510000669 2017-01-20 13:28:36
6 21609000856 2017-01-20 13:28:36
7 21606000405 2017-01-20 13:28:36
8 21610000133 2017-01-20 13:28:36
9 21604000592 2017-01-20 13:28:36
10 21609001012 2017-01-20 13:28:36
11 21605000183 2017-01-16 19:51:33
12 21605000183 2017-01-16 19:51:33
13 21605000183 2017-01-16 19:51:33
14 21605000183 2017-01-16 19:51:33
15 21602000125 2017-01-20 13:28:36
16 21608000354 2017-01-20 13:28:36