R/count_lines.r

Defines functions count_lines

Documented in count_lines

#' Count lines in a file
#'
#' \code{count_lines} uses UNIX system command \code{wc} to determine the number
#'   of lines in the given file
#'
#' @param file path to file in question
#'
#' @export

count_lines <- function(file) {
  return(as.numeric(system(paste('wc -l <', file), intern = T)))
}
benfasoli/uataq documentation built on Sept. 27, 2021, 9:29 p.m.