The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

lsr

CRAN status Codecov test coverage

lsr is a companion package to the textbook Learning Statistics with R. It provides beginner-friendly wrappers for common statistical procedures — t-tests, chi-square tests, effect sizes, correlation matrices, and basic data manipulation — with output designed to be readable by students encountering statistics for the first time.

Example

Here is an independent-samples t-test comparing extra sleep between two drug groups in the built-in sleep dataset:

library(lsr)
independentSamplesTTest(formula = extra ~ group, data = sleep)
#> 
#>    Welch's independent samples t-test 
#> 
#> Outcome variable:   extra 
#> Grouping variable:  group 
#> 
#> Descriptive statistics: 
#>                 1     2
#>    mean     0.750 2.330
#>    std dev. 1.789 2.002
#> 
#> Hypotheses: 
#>    null:        population means equal for both groups
#>    alternative: different population means in each group
#> 
#> Test results: 
#>    t-statistic:  -1.861 
#>    degrees of freedom:  17.776 
#>    p-value:  0.079 
#> 
#> Other information: 
#>    two-sided 95% confidence interval:  [-3.365, 0.205] 
#>    estimated effect size (Cohen's d):  0.832

Compared to base R’s t.test(), the output labels every component in plain English and automatically reports Cohen’s d alongside the test result.

Where to go next

Installation

Install the released version from CRAN:

install.packages("lsr")

Or the development version from GitHub:

# install.packages("devtools")
devtools::install_github("djnavarro/lsr")

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.