my_path: Load and installs packages needed

View source: R/my_paths.R

my_pathR Documentation

Load and installs packages needed

Description

This function loads all necessary packages. If the package is not installed, it will install it first and the it will load the recently installed package

Usage

my_path(
  path_type,
  extra_path = "",
  name = "",
  list_files = "NA",
  fn = F,
  repo = TRUE,
  read = FALSE,
  header = TRUE,
  project = TRUE,
  system = NA
)

Arguments

path_type

Type of path needed "D" for Data, "R", for Result and "G" for generic. You need those paths to be load in the global environment

extra_path

Any sub-path to add WITHIN the folders. Note, if it is before, include it on the "Folder" parameter -e.g. project/SubFolder -

name

Dataset name in case you want the option to load data

list_files

returns the list of files if set to "names"

fn

full names for list of files set to F

repo

Normally set to jepa88 but if connection to Drobo is available use repo = "FALSE"

read

Default read = FALSE. read = FALSE will only return a path wile read = TURE will read a dataset

project

I normally call my data folder the same as the project so it automatically sets to the project name. Alternatives available.

system

If you want to override the automatic system identification

Value

Paths to save and load data within a project


jepa/MyFunctions documentation built on June 14, 2025, 1:12 p.m.