forked from tra418/CSB-311-Spring-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIntro to R - Ch 09.R
31 lines (25 loc) · 1013 Bytes
/
Intro to R - Ch 09.R
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
############################################################
# R script to accompany Intro to R for Business, Chapter 09#
# Written by Troy Adair #
############################################################
# First, clear memory and the Console
rm(list=ls(all=TRUE))
cat("\014")
library(here)
# Load the previously referenced data frame in "YT_Sample_Validated.RData"
load(here("Data","YT_Sample_Validated.RData"))
# Install and load packages that seem to be dependencies of Rcmdr
if (!require("Rtools")) install.packages("Rtools")
library(Rtools)
if (!require("data.table")) install.packages("data.table")
library(data.table)
if (!require("car")) install.packages("car")
library(car)
# Let's try to run Rcmdr
if (!require("Rcmdr")) install.packages("Rcmdr")
library(Rcmdr)
# Install RColorBrewer and then try again to run Rcmdr
if (!require("RColorBrewer")) install.packages("RColorBrewer")
library(Rcmdr)
# When done with Rcmdr
detach("package:Rcmdr", unload = TRUE)