R/m067.dirs.R

Defines functions m067.required_packages m067.phendir

#-------------------
# load directories
#-------------------

#' @export
m067.phendir <- function()
{
  nodename <- Sys.info()[["nodename"]]

  switch(nodename,
      'macbook-pro.csc.es' = '~/Documents/Datasets/m067/original_ddbb',
      'crp1028.csc.es' = '~/Documents/Datasets/m067/original_ddbb',
      'CRP1028.local' = '~/Documents/Datasets/m067/original_ddbb',
			'annamiquel-Aspire-E5-571' = '~/Datasets/m067/original_ddbb',
      'annamiquel-H110M-S2H' = '/home/annamiquel/Datasets/m067/original_ddbb',
      'LAPTOP-UJDSJL8E' = '~/Datasets/m067/original_ddbb',

    stop(paste0("`nodemname` (", nodename, ") is unknown")))
}


#---------------
# load packages
#---------------

m067.required_packages <- function()
{
	### repositories
	local({r <- getOption('repos')
       r['CRAN'] <- 'https://cloud.r-project.org/'
       options(repos = r)})

	### funtion to auto_load
	auto_load <- function(a.package){
		 			 			suppressWarnings(suppressPackageStartupMessages(
   		 					library(a.package, character.only = T)))
	}

	### list of packages
	pacman::p_load(
    tidyverse, lubridate, data.table, testthat, assertthat,
		plyr, Hmisc, reshape, viridis, scales, magrittr, gtools,
    gridExtra, rmarkdown, knitr, prettydoc, DT, car, broom,
    nlme, readxl, openxlsx, drLumi, tidyr, stringr, lpSolveAPI)

		# rm funtions `R.profile`
			rm(list = ls(all = T))
}
mvazquezs/m067tools documentation built on April 19, 2019, 7:07 p.m.