-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_script.R
More file actions
24 lines (18 loc) · 877 Bytes
/
example_script.R
File metadata and controls
24 lines (18 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
##############################################################################
## This is an example script that calculates descriptives ##
## on the cars dataset ##
## By Marjolein Barendse ##
##############################################################################
##Clear Environment
rm(list=ls())
##Turn off scientific notation
options(scipen=999)
##Run all necessary functional workshop scripts to create/load data.complete
## Load required packages
packages <- c("psych", "tidyr","dplyr")
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
install.packages(setdiff(packages, rownames(installed.packages())))
}
lapply(packages, library, character.only = TRUE)
#Descriptives
describe(mtcars)