Learn R Programming

lsr

The goal of lsr is to provide tools intended to make introductory statistics easier to teach, including wrappers for common hypothesis tests and basic data manipulation. The package is associated with the introductory textbook at https://learningstatisticswithr.com

Installation

You can install the released version of lsr from CRAN with:

install.packages("lsr")

And the development version from GitHub with:

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

Note

I am in the process of updating the package after a long hiatus. The long-term plan for the package is maintenance-focused: it is unlikely to see new functionality or API changes, but I intend to extend unit tests, improve the internals, and generally make the package more reliable. Breaking changes will be avoided except as needed to fix erroneous results.

Copy Link

Version

Install

install.packages('lsr')

Monthly Downloads

9,332

Version

0.5.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

December 1st, 2021

Functions in lsr (0.5.2)

ciMean

Confidence interval around the mean
associationTest

Chi-square test of association / independence
cramersV

Cramer's V
copy

Copies a vector into a matrix
correlate

Correlation matrices
etaSquared

Effect size calculations for ANOVAs
bars

Grouped Bar Plots with Error Bars
aad

Mean (average) absolute deviation from the mean
cohensD

Cohen's d
expandFactors

Expand factors to a set of contrasts
posthocPairwiseT

Post-hoc pairwise t-tests for ANOVA
standardCoefs

Standardised regression coefficients
permuteLevels

Permute the levels of a factor
sortFrame

Sort a data frame
pairedSamplesTTest

Paired samples t-test
who

Contents of workspace
wideToLong

Reshape from wide to long
longToWide

Reshape from long to wide
independentSamplesTTest

Independent samples t-test
print.gofTest

Print method for lsr goodness-of-fit tests
maxFreq

Sample mode
print.whoList

Print method for whoList objects
oneSampleTTest

One sample t-test
importList

Import a list
quantileCut

Cut by quantiles
goodnessOfFitTest

Chi-square test against specified probabilities
rmAll

Remove all objects
print.assocTest

Print method for lsr chi-square tests
print.correlate

Print method for correlate objects
tFrame

Transpose a data frame
print.TTest

Print method for lsr t-tests
unlibrary

Unload a package