Learn R Programming

⚠️There's a newer version (1.1) of this package.Take me there.

fastR

This package contains data sets and some utility functions to support Foundations and Applications of Statistics: An Introduction Using R by Randall Pruim.

Installation

The package can be installed from CRAN via

install.packages("fastR")

or from github

devtools::install_github("rpruim/fastR")

Snippets

In addtion to data sets, fastR contains a snippet() function that loads and executes code found in the text. Here is an example:

require(fastR)
require(multcomp)
snippet("bugs")
#> 
#> 
#> 	snippet(bugs)
#> 	------- ~~~~
#> 
#> > model <- aov(sqrt(NumTrap)~Color,bugs)
#> 
#> > TukeyHSD(model)
#>   Tukey multiple comparisons of means
#>     95% family-wise confidence level
#> 
#> Fit: aov(formula = sqrt(NumTrap) ~ Color, data = bugs)
#> 
#> $Color
#>          diff        lwr        upr     p adj
#> G-B  1.750330  0.6458303  2.8548288 0.0013396
#> W-B  0.146892 -0.9576072  1.2513913 0.9818933
#> Y-B  3.060201  1.9557018  4.1647003 0.0000011
#> W-G -1.603438 -2.7079368 -0.4989383 0.0031308
#> Y-G  1.309872  0.2053723  2.4143708 0.0165743
#> Y-W  2.913309  1.8088098  4.0178083 0.0000022
#> 
#> 
#> > model <- lm(sqrt(NumTrap)~Color,bugs)
#> 
#> > summary(glht(model,mcp(Color="Tukey")))
#> 
#> 	 Simultaneous Tests for General Linear Hypotheses
#> 
#> Multiple Comparisons of Means: Tukey Contrasts
#> 
#> 
#> Fit: lm(formula = sqrt(NumTrap) ~ Color, data = bugs)
#> 
#> Linear Hypotheses:
#>            Estimate Std. Error t value Pr(>|t|)    
#> G - B == 0   1.7503     0.3946   4.436  0.00136 ** 
#> W - B == 0   0.1469     0.3946   0.372  0.98189    
#> Y - B == 0   3.0602     0.3946   7.755  < 0.001 ***
#> W - G == 0  -1.6034     0.3946  -4.063  0.00305 ** 
#> Y - G == 0   1.3099     0.3946   3.319  0.01656 *  
#> Y - W == 0   2.9133     0.3946   7.383  < 0.001 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> (Adjusted p values reported -- single-step method)

Copy Link

Version

Install

install.packages('fastR')

Monthly Downloads

25

Version

0.10.3

License

GPL (>= 2)

Maintainer

Randall Pruim

Last Published

July 27th, 2017

Functions in fastR (0.10.3)

balldrop

Ball dropping data
batting

Major League Batting 2000-2005
airlineArrival

Airline On-Time Arrival Data
airpollution

Air pollution measurements
births78

Births by Day
buckthorn

Buckthorn
fastR-package

Foundations and Applications of Statistics
fumbles

NCAA football fumbles
endurance

Endurance and vitamin C
familySmoking

Family smoking
ice

Cooling muscles with ice
inflation

Inflation data
mathnoise

Test performance and noise
miaa05

MIAA basketball 2004-2005 season
rgolfballs

Simulated golf ball data
rubberband

Rubber band launching -- unfinished documentation
tdf

Compute degrees of freedom for a 2-sample t-test
tirewear

Estimating tirewear
kids

Goals and popularity factors for school kids
littleSurvey

Results from a little survey
noise

Noise -- unfinished documentation
palettes

Palette repair data
Jordan8687

Michael Jordan personal scoring
actgpa

ACT scores and GPA
deathPenalty

Death Penalty and Race
drag

Drag force experiment
gpa

GPA, ACT, and SAT scores
heliumFootballs

Punting helium- and air-filled footballs
nlmax

Nonlinear maximization and minimization
bugs

Bugs
col.fastR

Lattice Theme
col.perc

Row and Column Percentages
petstress

Pets and stress
pigs

Pass the Pigs
students

Standardized test scores and GPAs
tastetest

Taste test data
nfl2007

NFL 2007 season
undocumented

Undocumented functions
utilities

Utilities bills
corn

Corn Yield
cuckoo

Cuckoo eggs in other birds' nests
pheno

FUSION type 2 diabetes study
scent

Maze tracing and scents
snippet

Display or execute a snippet of R code
step

Stepping experiment
concrete

Concrete Compressive Strength Data
givenOrder

Create ordered factor with order inferred from order given
golfballs

Golf ball numbers
stereogram

Stereogram fusion
vaov

ANOVA vectors
wilson.ci

Confidence Intervals for Proportions
paperplanes

Paper airplanes
pendulum

Pendulum data
pitching2005

Major League Baseball 2005 pitching
geolm

Geometric representation of linear model
mlb2004

Major League Baseball 2004 team data
ncaa2010

NCAA Division I Basketball Results
punting

American football punting
ratpoison

Rat poison -- unfinished documentation
soap

Dwindling soap
spheres

Measuring spheres
poison

Poison data
traffic

New England traffic fatalities (1951-1959)
trebuchet

Trebuchet data
workingWomen

Women in the workforce
xplot

Augmented functions