forked from kiat/R-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModule-4-Example-4.R
33 lines (23 loc) · 875 Bytes
/
Module-4-Example-4.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
32
33
# This R program requires the following two packages.
# Install the following packages before running this program.
# install.packages("openintro")
# OpenIntro data sets and supplemental functions
# install.packages("psych")
# A package for personality, psychometric, and psychological research
require(openintro)
require(psych)
require(tibble)
# SAT and GPA data for 1000 students at an unnamed college.
data(satGPA)
# Take a look at this data set
?satGPA
# it includes the following attributes
# sex , Gender of the student.
# SATV, Verbal SAT percentile.
# SATM, Math SAT percentile.
# SATSum, Total of verbal and math SAT percentiles.
# HSGPA, High school grade point average.
# FYGPA, First year (college) grade point average.
satGPA <- as.tibble(satGPA)
# Scatterplot matrix of SAT and GPA data set.
pairs.panels(satGPA[,-4], ellipse=F, col="red", lwd=2)