0% found this document useful (0 votes)
106 views

Lecture 5 - Scatter Plot Matrix

This document summarizes the steps taken to install the "car" package in R and any errors encountered. It shows the code used to set the working directory, import a data file, and plot certain variables. It then displays the output from installing the "car" package and its dependencies, including downloading package files from online mirrors.

Uploaded by

Dani Sha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views

Lecture 5 - Scatter Plot Matrix

This document summarizes the steps taken to install the "car" package in R and any errors encountered. It shows the code used to set the working directory, import a data file, and plot certain variables. It then displays the output from installing the "car" package and its dependencies, including downloading package files from online mirrors.

Uploaded by

Dani Sha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

Lecture 5: Scatter Plot Matrix

setwd("C:/Users/Danisha/OneDrive/Desktop/Statistical _Methods")
read.csv("AnscombeData.csv",header=T)

----------------------------------------------------------------
> setwd("C:/Users/Danisha/OneDrive/Desktop/Statistical _Methods")
> data<-read.csv("insurance",header=T)
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'insurance': No such file or directory
> data<-read.csv("insurance.csv",header=T)
> View(data)
> plot(data[c(1,3,4,7)])
> install.package("car")
Error in install.package("car") :
could not find function "install.package"
> install.packages("car")
Installing package into ‘C:/Users/Danisha/OneDrive/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
also installing the dependencies ‘clipr’, ‘R6’, ‘BH’, ‘cpp11’, ‘glue’, ‘purrr’,
‘digest’, ‘rematch’, ‘prettyunits’, ‘assertthat’, ‘utf8’, ‘matrixStats’,
‘RcppArmadillo’, ‘forcats’, ‘hms’, ‘readr’, ‘rlang’, ‘tidyselect’, ‘vctrs’,
‘cellranger’, ‘progress’, ‘zip’, ‘stringi’, ‘cli’, ‘crayon’, ‘ellipsis’, ‘fansi’,
‘lifecycle’, ‘pillar’, ‘pkgconfig’, ‘magrittr’, ‘SparseM’, ‘MatrixModels’,
‘conquer’, ‘sp’, ‘haven’, ‘curl’, ‘data.table’, ‘readxl’, ‘openxlsx’, ‘tibble’,
‘minqa’, ‘nloptr’, ‘statmod’, ‘Rcpp’, ‘RcppEigen’, ‘carData’, ‘abind’, ‘pbkrtest’,
‘quantreg’, ‘maptools’, ‘rio’, ‘lme4’

There are binary versions available but the source versions are later:
binary source needs_compilation
RcppArmadillo 0.10.1.0.0 0.10.1.2.0 TRUE
vctrs 0.3.4 0.3.5 TRUE
magrittr 1.5 2.0.1 TRUE

Binaries will be installed


trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/clipr_0.7.1.zip'
Content type 'application/zip' length 52166 bytes (50 KB)
downloaded 50 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/R6_2.5.0.zip'


Content type 'application/zip' length 83898 bytes (81 KB)
downloaded 81 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/BH_1.72.0-3.zip'


Content type 'application/zip' length 18270723 bytes (17.4 MB)
downloaded 17.4 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/cpp11_0.2.4.zip'


Content type 'application/zip' length 179177 bytes (174 KB)
downloaded 174 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/glue_1.4.2.zip'


Content type 'application/zip' length 154817 bytes (151 KB)
downloaded 151 KB
trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/purrr_0.3.4.zip'
Content type 'application/zip' length 428682 bytes (418 KB)
downloaded 418 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/digest_0.6.27.zip'


Content type 'application/zip' length 268469 bytes (262 KB)
downloaded 262 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/rematch_1.0.1.zip'


Content type 'application/zip' length 16101 bytes (15 KB)
downloaded 15 KB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/prettyunits_1.1.1.zip'
Content type 'application/zip' length 37601 bytes (36 KB)
downloaded 36 KB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/assertthat_0.2.1.zip'
Content type 'application/zip' length 54829 bytes (53 KB)
downloaded 53 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/utf8_1.1.4.zip'


Content type 'application/zip' length 208248 bytes (203 KB)
downloaded 203 KB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/matrixStats_0.57.0.zip'
Content type 'application/zip' length 1574011 bytes (1.5 MB)
downloaded 1.5 MB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/RcppArmadillo_0.10.1.0.0.zip'
Content type 'application/zip' length 2657248 bytes (2.5 MB)
downloaded 2.5 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/forcats_0.5.0.zip'


Content type 'application/zip' length 356027 bytes (347 KB)
downloaded 347 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/hms_0.5.3.zip'


Content type 'application/zip' length 109389 bytes (106 KB)
downloaded 106 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/readr_1.4.0.zip'


Content type 'application/zip' length 1819847 bytes (1.7 MB)
downloaded 1.7 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/rlang_0.4.8.zip'


Content type 'application/zip' length 1137632 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/tidyselect_1.1.0.zip'
Content type 'application/zip' length 202882 bytes (198 KB)
downloaded 198 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/vctrs_0.3.4.zip'


Content type 'application/zip' length 1190370 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/cellranger_1.1.0.zip'
Content type 'application/zip' length 104393 bytes (101 KB)
downloaded 101 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/progress_1.2.2.zip'


Content type 'application/zip' length 85775 bytes (83 KB)
downloaded 83 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/zip_2.1.1.zip'


Content type 'application/zip' length 1119126 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/stringi_1.5.3.zip'


Content type 'application/zip' length 15243599 bytes (14.5 MB)
downloaded 14.5 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/cli_2.1.0.zip'


Content type 'application/zip' length 409315 bytes (399 KB)
downloaded 399 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/crayon_1.3.4.zip'


Content type 'application/zip' length 750510 bytes (732 KB)
downloaded 732 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/ellipsis_0.3.1.zip'


Content type 'application/zip' length 45981 bytes (44 KB)
downloaded 44 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/fansi_0.4.1.zip'


Content type 'application/zip' length 222861 bytes (217 KB)
downloaded 217 KB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/lifecycle_0.2.0.zip'
Content type 'application/zip' length 101530 bytes (99 KB)
downloaded 99 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/pillar_1.4.6.zip'


Content type 'application/zip' length 181638 bytes (177 KB)
downloaded 177 KB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/pkgconfig_2.0.3.zip'
Content type 'application/zip' length 22180 bytes (21 KB)
downloaded 21 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/magrittr_1.5.zip'


Content type 'application/zip' length 157529 bytes (153 KB)
downloaded 153 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/SparseM_1.78.zip'


Content type 'application/zip' length 1065447 bytes (1.0 MB)
downloaded 1.0 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/MatrixModels_0.4-


1.zip'
Content type 'application/zip' length 440213 bytes (429 KB)
downloaded 429 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/conquer_1.0.2.zip'


Content type 'application/zip' length 952020 bytes (929 KB)
downloaded 929 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/sp_1.4-4.zip'


Content type 'application/zip' length 1908578 bytes (1.8 MB)
downloaded 1.8 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/haven_2.3.1.zip'


Content type 'application/zip' length 1248516 bytes (1.2 MB)
downloaded 1.2 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/curl_4.3.zip'


Content type 'application/zip' length 4126467 bytes (3.9 MB)
downloaded 3.9 MB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/data.table_1.13.2.zip'
Content type 'application/zip' length 2579530 bytes (2.5 MB)
downloaded 2.5 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/readxl_1.3.1.zip'


Content type 'application/zip' length 1708928 bytes (1.6 MB)
downloaded 1.6 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/openxlsx_4.2.3.zip'


Content type 'application/zip' length 2757048 bytes (2.6 MB)
downloaded 2.6 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/tibble_3.0.4.zip'


Content type 'application/zip' length 414989 bytes (405 KB)
downloaded 405 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/minqa_1.2.4.zip'


Content type 'application/zip' length 855140 bytes (835 KB)
downloaded 835 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/nloptr_1.2.2.2.zip'


Content type 'application/zip' length 1244202 bytes (1.2 MB)
downloaded 1.2 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/statmod_1.4.35.zip'


Content type 'application/zip' length 281498 bytes (274 KB)
downloaded 274 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/Rcpp_1.0.5.zip'


Content type 'application/zip' length 3265876 bytes (3.1 MB)
downloaded 3.1 MB

trying URL 'https://cloud.r-


project.org/bin/windows/contrib/4.0/RcppEigen_0.3.3.7.0.zip'
Content type 'application/zip' length 2877827 bytes (2.7 MB)
downloaded 2.7 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/carData_3.0-4.zip'


Content type 'application/zip' length 1820069 bytes (1.7 MB)
downloaded 1.7 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/abind_1.4-5.zip'


Content type 'application/zip' length 63788 bytes (62 KB)
downloaded 62 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/pbkrtest_0.4-


8.6.zip'
Content type 'application/zip' length 274905 bytes (268 KB)
downloaded 268 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/quantreg_5.75.zip'


Content type 'application/zip' length 1899644 bytes (1.8 MB)
downloaded 1.8 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/maptools_1.0-2.zip'


Content type 'application/zip' length 2168965 bytes (2.1 MB)
downloaded 2.1 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/rio_0.5.16.zip'


Content type 'application/zip' length 504968 bytes (493 KB)
downloaded 493 KB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/lme4_1.1-25.zip'


Content type 'application/zip' length 5298763 bytes (5.1 MB)
downloaded 5.1 MB

trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.0/car_3.0-10.zip'


Content type 'application/zip' length 1561500 bytes (1.5 MB)
downloaded 1.5 MB

package ‘clipr’ successfully unpacked and MD5 sums checked


package ‘R6’ successfully unpacked and MD5 sums checked
package ‘BH’ successfully unpacked and MD5 sums checked
package ‘cpp11’ successfully unpacked and MD5 sums checked
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘purrr’ successfully unpacked and MD5 sums checked
package ‘digest’ successfully unpacked and MD5 sums checked
package ‘rematch’ successfully unpacked and MD5 sums checked
package ‘prettyunits’ successfully unpacked and MD5 sums checked
package ‘assertthat’ successfully unpacked and MD5 sums checked
package ‘utf8’ successfully unpacked and MD5 sums checked
package ‘matrixStats’ successfully unpacked and MD5 sums checked
package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
package ‘forcats’ successfully unpacked and MD5 sums checked
package ‘hms’ successfully unpacked and MD5 sums checked
package ‘readr’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘tidyselect’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘cellranger’ successfully unpacked and MD5 sums checked
package ‘progress’ successfully unpacked and MD5 sums checked
package ‘zip’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘cli’ successfully unpacked and MD5 sums checked
package ‘crayon’ successfully unpacked and MD5 sums checked
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘fansi’ successfully unpacked and MD5 sums checked
package ‘lifecycle’ successfully unpacked and MD5 sums checked
package ‘pillar’ successfully unpacked and MD5 sums checked
package ‘pkgconfig’ successfully unpacked and MD5 sums checked
package ‘magrittr’ successfully unpacked and MD5 sums checked
package ‘SparseM’ successfully unpacked and MD5 sums checked
package ‘MatrixModels’ successfully unpacked and MD5 sums checked
package ‘conquer’ successfully unpacked and MD5 sums checked
package ‘sp’ successfully unpacked and MD5 sums checked
package ‘haven’ successfully unpacked and MD5 sums checked
package ‘curl’ successfully unpacked and MD5 sums checked
package ‘data.table’ successfully unpacked and MD5 sums checked
package ‘readxl’ successfully unpacked and MD5 sums checked
package ‘openxlsx’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
package ‘minqa’ successfully unpacked and MD5 sums checked
package ‘nloptr’ successfully unpacked and MD5 sums checked
package ‘statmod’ successfully unpacked and MD5 sums checked
package ‘Rcpp’ successfully unpacked and MD5 sums checked
package ‘RcppEigen’ successfully unpacked and MD5 sums checked
package ‘carData’ successfully unpacked and MD5 sums checked
package ‘abind’ successfully unpacked and MD5 sums checked
package ‘pbkrtest’ successfully unpacked and MD5 sums checked
package ‘quantreg’ successfully unpacked and MD5 sums checked
package ‘maptools’ successfully unpacked and MD5 sums checked
package ‘rio’ successfully unpacked and MD5 sums checked
package ‘lme4’ successfully unpacked and MD5 sums checked
package ‘car’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in


C:\Users\Danisha\AppData\Local\Temp\RtmpopSE3j\downloaded_packages
> library(car)
Loading required package: carData
> attach(data)
> scatterplotMatrix(~charges+age)
> scatterplotMatrix(~charges+age,reg=F,smooth=F)
> scatterplotMatrix(~charges+age|sex,reg=F,smooth=F)
> scatterplotMatrix(~charges+age+bmi+children|sex,reg=F,smooth=F)
>

You might also like