
Last chance! 50% off unlimited learning
Sale ends in
LOCF(x)
## S3 method for class 'default':
LOCF(x)
## S3 method for class 'data.frame':
LOCF(x)
## S3 method for class 'matrix':
LOCF(x)
d.frm <- data.frame(
tag=rep(c("mo", "di", "mi", "do", "fr", "sa", "so"), 4)
, val=rep(c(runif(5), rep(NA,2)), 4) )
d.frm$locf <- LOCF( d.frm$val )
d.frm
Run the code above in your browser using DataLab