(splits <- split_path(c(getwd(), "~", r_home())))
# Reverse the operation
sapply(splits, paste, collapse = "/")
base_r_files <- split_dir(R.home(), pattern = "\\.R$")
# Viewing not needed for testing purposes
utils::View(base_r_files)
Run the code above in your browser using DataLab