get_file_path: Source and local file paths

Description Usage Arguments Examples

Description

Returns file path to directories containing 'kinlab' sources and local data on linux and windows machines.

Usage

1
2
3
4
5
6
7
get_file_path(path_type = c("local", "source", "inst", "cloud")[1],
  db = c("kh", "qb")[1], dir = "data", sub = NULL,
  linux_source = paste0("/home/johow/Dropbox/db/", db),
  win_source = paste0("C:/Users/JJ/Desktop/db/", db),
  inst_source = ifelse(grepl("linux", R.version["platform"]),
  "/media/johow/USB DISK/inst/data", "H://inst/data"), pkg = "kinlab",
  my_lib = NULL)

Arguments

path_type

Either 'local' for the 'kinlab' folder installed on the current machine, or 'source' folders specified in ‘linux_source' and 'win_source', or ’cloud' for predefined Dropbox folder)

db

A name of a data source, currently either 'kh' (i.e. Krummhörn, as default) or 'qb' (Quebec).

dir

Name of the local kinlab directory in library (Default is 'inst')

sub

NULL or name of subdirectory (if required, default is 'file.path("data", db))

linux_source

Linux source folder (including subdirectory for 'db')

win_source

Windows source folder (including subdirectory for 'db')

inst_source

Source folder for library directory

pkg

Internal use (not to be changed by user)

my_lib

Optionally allows setting a library directory manually

Examples

1
2
3
4
## Not run: 
grap_ped(1067, df_ped)

## End(Not run)

johow/kinlab documentation built on July 5, 2019, 4:23 p.m.