Assignment 5 Scatter Plot, Histogram and Box-and-Whisker Plot by Variable

Import and View data set

library(readr)
library(psych)
library(ggplot2)
## 
## Attaching package: 'ggplot2'
## The following objects are masked from 'package:psych':
## 
##     %+%, alpha
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
View(attitude)
names(attitude)
## [1] "rating"     "complaints" "privileges" "learning"   "raises"    
## [6] "critical"   "advance"

Assignment 5 Plotting Variables

plot(attitude, main="Scatter Plot of Attitude Data Set")

boxplot(attitude,horizontal = TRUE, main="Box Plot of Attitude Data Set", frame.plot=FALSE)

hist(attitude$rating,10,labels = TRUE, main="Histogram of Rating",xlab = "Rating")

hist(attitude$complaints,5,labels = TRUE, main="Histogram of Complaints",xlab = "Complaints")

hist(attitude$privileges,labels = TRUE, main="Histogram of Privileges",xlab = "Privileges")

hist(attitude$learning,12,labels = TRUE, main="Histogram of Learning",xlab = "Learning")

hist(attitude$raises,10,labels = TRUE, main="Histogram of Raises",xlab = "Raises")

hist(attitude$critical,8,labels = TRUE, main="Histogram of Critical",xlab = "Critical")

hist(attitude$advance,10,labels = TRUE, main="Histogram of Advance",xlab = "Advance")