R/utils.R

Defines functions path_reduce

path_reduce <- function(src) {
  src <- gsub(normalizePath(getwd(),winslash = '/'), ".", src)
  src <- gsub(normalizePath(tempdir(),winslash = '/'), ".", src)
  gsub(dirname(normalizePath(tempdir(),winslash = '/')), ".", src)
}

Try the whereami package in your browser

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

whereami documentation built on Dec. 28, 2022, 2:40 a.m.