R/getskip.R

"getskip" <- function(file){
  Line    <- readLines(file, n=20)
  nSpace  <- sapply(gregexpr("\\s+", Line), function(p) { sum(p>=0) } )
  isTable <- nSpace==nSpace[length(nSpace)]
  skip    <- length(Line) - which.max(rev(!c(FALSE,isTable)))+1
  cat(paste("Using  skip =",skip,"\n"))
  skip
}

Try the optiSel package in your browser

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

optiSel documentation built on Jan. 16, 2021, 5:30 p.m.