From 4f50786c6fd6a854c00e1a82eea4da65807d4fb4 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Sat, 28 Mar 2020 17:56:39 +0000 Subject: [PATCH] added R header file to base dir to allow general access by R scripts --- my_header.R | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 my_header.R diff --git a/my_header.R b/my_header.R new file mode 100644 index 0000000..5009f29 --- /dev/null +++ b/my_header.R @@ -0,0 +1,135 @@ +######################################################### +### A) Installing and loading required packages +######################################################### +#lib_loc = "/usr/local/lib/R/site-library") + +#if (!require("gplots")) { +# install.packages("gplots", dependencies = TRUE) +# library(gplots) +#} + +#if (!require("tidyverse")) { +# install.packages("tidyverse", dependencies = TRUE) +# library(tidyverse) +#} + +if (!require("ggplot2")) { + install.packages("ggplot2", dependencies = TRUE) + library(ggplot2) +} + +if (!require("ggridges")) { + install.packages("ggridges", dependencies = TRUE) + library(ggridges) +} + +if (!require("plotly")) { + install.packages("plotly", dependencies = TRUE) + library(plotly) +} + +if (!require("cowplot")) { + install.packages("copwplot", dependencies = TRUE) + library(cowplot) +} + +if (!require("ggcorrplot")) { + install.packages("ggcorrplot", dependencies = TRUE) + library(ggcorrplot) +} + +if (!require("ggpubr")) { + install.packages("ggpubr", dependencies = TRUE) + library(ggpubr) +} + +if (!require("RColorBrewer")) { + install.packages("RColorBrewer", dependencies = TRUE) + library(RColorBrewer) +} + +if (!require ("GOplot")) { + install.packages("GOplot") + library(GOplot) +} + +if(!require("VennDiagram")) { + install.packages("VennDiagram", dependencies = T) + library(VennDiagram) +} + +if(!require("scales")) { + install.packages("scales", dependencies = T) + library(scales) +} + +if(!require("plotrix")) { + install.packages("plotrix", dependencies = T) + library(plotrix) +} + +if(!require("stats")) { + install.packages("stats", dependencies = T) + library(stats) +} + +if(!require("stats4")) { + install.packages("stats4", dependencies = T) + library(stats4) +} + +if(!require("data.table")) { +install.packages("data.table") + library(data.table) +} + +if (!require("PerformanceAnalytics")){ + install.packages("PerformanceAnalytics", dependencies = T) + library(PerformaceAnalytics) +} + +if (!require ("GGally")){ + install.packages("GGally") + library(GGally) +} + +if (!require ("corrr")){ + install.packages("corrr") + library(corrr) +} + +if (!require ("psych")){ + install.packages("psych") + library(psych) +} + +if (!require ("dplyr")){ + install.packages("dplyr") + library(dplyr) +} + +if (!require ("compare")){ + install.packages("compare") + library(compare) +} + +if (!require ("arsenal")){ + install.packages("arsenal") + library(arsenal) +} + + +####TIDYVERSE +# Install +#if(!require(devtools)) install.packages("devtools") +#devtools::install_github("kassambara/ggcorrplot") + +#library(ggcorrplot) + + +###for PDB files +#install.packages("bio3d") +if(!require(bio3d)){ + install.packages("bio3d") + library(bio3d) +}