-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_packages.R
More file actions
52 lines (38 loc) · 1.48 KB
/
install_packages.R
File metadata and controls
52 lines (38 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# ==============================================================================
# R-Code - my first R Script
# date of creation: XXX
# authors: XXX
# ==============================================================================
################
# load packages
################
# if packages are not already installed, the function will install and activate them
usePackage <- function(p) {
if (!is.element(p, installed.packages()[,1]))
install.packages(p, dep = TRUE)
require(p, character.only = TRUE)
}
## Error handling Install packages in R base
# options(repos="https://CRAN.R-project.org")
usePackage("haven") # load SPSS, ... data
usePackage("tidyverse") # data cleaning and summarizing
usePackage("psych") # psychometric analysis (EFA)
## psychometric analysis
usePackage("moments") # skewness, kurtosis
## outputs
usePackage("stargazer") # create tables
usePackage("report") # get reports of statistical tests in APA7
usePackage("lavaan") # for CFA
usePackage("Cairo") # environment to save graphics
usePackage("epade") # easy plots like bar3d
usePackage("fontawesome")
usePackage("DT")
usePackage("afex")
usePackage("BayesFactor")
usePackage("ggstatsplot")
usePackage("rstatix")
usePackage("janitor")
## führt folgendes in R aus, evtl. habt ihr aber kein devtools installiert, dann erste Zeile "einkommentieren"
# install.packages("devtools")
devtools::install_github("hadley/emo")
usePackage("bibliometrix") # bibliometrics analyses