moved all test scripts for functions to tests/

This commit is contained in:
Tanushree Tunstall 2021-09-09 13:12:07 +01:00
parent 901f3896af
commit 9bb3ac2a01
15 changed files with 162 additions and 776 deletions

View file

@ -1,8 +1,12 @@
#########################################################
### A) Installing and loading required packages
# A) Installing and loading required packages
# B) My functions
#########################################################
#########################################################
#lib_loc = "/usr/local/lib/R/site-library")
require("getopt", quietly = TRUE) # cmd parse arguments
if (!require("tidyverse")) {
@ -10,6 +14,21 @@ if (!require("tidyverse")) {
library(tidyverse)
}
if (!require("shiny")) {
install.packages("shiny", dependencies = TRUE)
library(shiny)
}
if (!require("gridExtra")) {
install.packages("gridExtra", dependencies = TRUE)
library(gridExtra)
}
if (!require("ggridges")) {
install.packages("ggridges", dependencies = TRUE)
library(ggridges)
}
# if (!require("ggplot2")) {
# install.packages("ggplot2", dependencies = TRUE)
# library(ggplot2)
@ -20,6 +39,11 @@ if (!require("tidyverse")) {
# library(dplyr)
# }
if (!require ("plyr")){
install.packages("plyr")
library(plyr)
}
# Install
#if(!require(devtools)) install.packages("devtools")
#devtools::install_github("kassambara/ggcorrplot")
@ -140,4 +164,16 @@ if(!require(protr)){
# install.packages("BiocManager")
#BiocManager::install("Logolas")
library("Logolas")
library("Logolas")
####################################
# Load all my functions:
# only works if tidyverse is loaded
# hence included it here!
####################################
func_path = "~/git/LSHTM_analysis/scripts/functions/"
source_files <- list.files(func_path, "\\.R$") # locate all .R files
map(paste0(func_path, source_files), source) # source all your R scripts!