How i can move all the NA
to the top of the column F
of the DF
data.frame. I don't want to move its corresponding Dates
, just the NA
to the top of column
of F
.
set.seed(1500)
DF <- data.frame(Date = seq(as.Date("2001-01-01"), to= as.Date("2003-12-31"), by="day"),
A = runif(1095, 0,10),
D = runif(1095,5,15),
F = c(runif(1000,3,5), rep(NA, 95)))