R/path.goUpOneDir.R

Defines functions path.goUpOneDir

Documented in path.goUpOneDir

#' Return path up one directory
#'
#' @param p path
#' @return path with last directory removed
#' @examples
#' path.goUpOneDir('/Users/test/fish-100')
#' @export
path.goUpOneDir <- function(p) {
  gsub('(.*)(//?[^//]+)$','\\1',p)
}
thomasgredig/RAWdataR documentation built on Nov. 6, 2024, 9:46 a.m.