This R Companion to Statistics: Unlocking the Power of Data by Lock, Lock, Lock, Lock, and Lock provides
Lock5withR package can be installed from github using
This package contains all of the data sets used in the package and the
locket() function which can be used to run any of
417 code chunks from the campanion.
locket("Example2.11") #> #> #> locket(Example2.11) #> ------ ~~~~~~~~~~~ #> #> > ICU20 <- subset(ICUAdmissions, Age == "20") #> #> > mean( ~ HeartRate, data = ICU20) #>  82.2 #> #> > median( ~ HeartRate, data = ICU20) #>  80 #> #> > ICU55 = subset(ICUAdmissions, Age == "55") #> #> > mean( ~ HeartRate, data = ICU55) #>  108.5 #> #> > median( ~ HeartRate, data = ICU55) #>  106
The Locks have created an R package called
Lock5Data that contains the data sets from their text.
Some of these data sets have been modified in
Lock5withR to make them easier to use with R. Modified data sets include the following:
AllCountries BikeCommute BodyTemp50 CaffeineTaps CarbonDioxide CO2 EmployedACS Flight179 GPAGender ICUAdmissions MiamiHeat MindsetMatters NFLScores2011 NutritionStudy RestaurantTips RetailSales SalaryGender SampCountries SandP500 SleepStudy SpeedDating StudentSurvey USStates WaterTaste Wetsuits
Typically changes involved the inclusion of additional variables with better encodings. Somtimes
variables are replaced. In the case of
CO2 the data set has been renamed
avoid a name collision with a data set in the
locket() function is only available in
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.