I have a data frame of the following type:
I need to create a separate column that would include the last variables from each row starting with the column V9
, i.e. 15:32
, 13:44
, 16:37
, 15:31
, NULL
, NULL
, 16:10
, 16:22
etc. If it is easier, I can live with removing the empty rows (in this case 5 and 6).
I tried a combination of which.max
, length
and apply
, but the output did not make sense. So I have no idea what to do next. Thanks for help.