R/rellenar.R

rellenar <-
function(x){
  pos1=c(which(!is.na(x) & x!=""),length(x)+1)
  r1=pos1[-1]-pos1[-length(pos1)]
  x2=x[!is.na(x) & x!=""]
  x1=unlist(mapply(rep,x2,r1))
  dim(x1)=NULL
  names(x1)=NULL
  return(x1)
}

Try the leerSIECyL package in your browser

Any scripts or data that you put into this service are public.

leerSIECyL documentation built on May 2, 2019, 10:16 a.m.