I have a datatable
where each column represents a time series, and I want to grab the last NA value per time series in a column-ordered manner. In my particular use case my data looks like this:
a b c
1 2 5
1 -17 9
NA 11 4
NA 57 NA
63 NA NA
So out of this I would like to extract:
a b c
63 57 4
How can I accomplish this? So far I only see answers addressing the converse situation of extracting the last non-NA per row rather than per column.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…