Hi everyone
I am quite new to R so appologies if the question is very basic
I have a project that loads the following libraries:
install.packages("tidyverse")
library("tidyverse")
install.packages("psych")
library(psych)
install.packages("pastecs")
library(pastecs)
install.packages("gmodels")
library(gmodels)
install.packages("plyr")
library(plyr)
install.packages("magrittr")
library(magrittr)
install.packages("stargazer")
library(stargazer)
install.packages("sjPlot")
library(sjPlot)
library(MatchIt)
library(readxl)
library(sqldf)
library(data.table)
Interestingly, it seems I need to re-load the libraries every time I re-open the project. ie if I save and close the project and come back to it the second day I will need to re-load the packages to run the rest of the code...
Am I missing something or is there a way ro re-load the libraries automatically?
Also if you use a number of libraries frequently, is there a way to make RStudio "pre-load" these libraries automatically every time it starts (even if it is a new project?) One solution I have looked into is to use the pacman library
https://cran.r-project.org/web/packages/pacman/vignettes/Introduction_to_pacman.html
All suggestions are highly appreciated
Kind regards