R/top_dir.R

Defines functions top_dir

Documented in top_dir

#' Find top most directory
#' 
#' From a vector of file locations
#' 
#' @param files vector with file locations
#' @keywords file locations, io
#' @export

top_dir <- function(files){
  unlist(lapply(strsplit(files, "/"), "[[", 1))
}
khufkens/ineacannot documentation built on May 22, 2019, 5:30 p.m.