Getting the textbook source code.

The authors of the textbook for AMAT-554, Introduction to Mathematical Statistics 8e, provide some R data files for use with exercises and examples in the book. These data files are provided as an R package (hmcpkg). Unfortunately this package is not compiled for the current revision of R, and generates an error when installing.

install.packages("hmcpkg")
Installing package into 'C:/Users/me/somewhere/R/win-library/4.1'
(as 'lib' is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning message:
package 'hmcpkg' is not available for this version of R

The data files are also available for download via a URI provided in the textbook’s preface. The archive is in tar format. I have repackaged the tar file as a zip file and posted links to both, below.

tarball: hmcdata.tar.gz
zipfile: hmcdata.zip

These files can easily be loaded into an R session. Go to the filesystem location where you unpacked the data file archive and load it:

> setwd("C:/Users/me/somewhere/hmcdata/Data")
> load(file="darwin.rda")
> darwin
    cross   self
1  23.500 17.375
2  12.000 20.375
3  21.000 20.000
4  22.000 20.000
5  19.125 18.375
6  21.550 18.625
7  22.125 18.625
8  20.375 15.250
9  18.250 16.500
10 21.625 18.000
11 23.250 16.250
12 21.000 18.000
13 22.125 12.750
14 23.000 15.500
15 12.000 18.000  

If you save your R session (when prompted to do so) these data structures will be saved as well!


R  amat554 

See also