The lsr package is the package associated with my introductory statistics class lecture notes, Learning Statistics with R. The package contains a number of convenience functions and simple statistical tools that I've found are handy for beginners to have access to.
The current version on CRAN is 0.3.2. The repository files represent the current state of 0.5, to correspond with version 0.5 of the book
The easiest way to use any of the functions in the lsr package is to install the CRAN version. The CRAN page for the package is here. It has no dependencies on any packages (other than those that are distributed as the R core, obviously), and can be installed from within R using the command:
install.packages("lsr")
The devtools package contains functions that allow you to install R packages directly from bitbucket or github. If you've installed and loaded the devtools package, the installation command is
install_bitbucket("lsr-package","dannavarro")
Each function can be found in a separate file, with the usual .R extension. Some minimal documentation and commenting can be found in the source code, but as usual the most extensive help information is in the .Rd file associated with each function.
aad Mean (average) absolute deviation from the meanmaxFreq Frequency of the sample modemodeOf Sample mode quantileCut Cut a variable into several equally sized categoriescorrelate Compute a correlation matrixbars Bar plots with confidence intervals, grouped by one or two factorscohensD Cohen's d measure of effect size for t-testscramersV Cramer's V measure of effect size for chi-square testsetaSquared Effect size calculations for ANOVAs (handles Type I, II and III)ciMean Compute a standard (i.e. normal) confidence interval around the sample meanstandardCoefs Compute standardised regression coefficients for a linear modelposthocPairwiseT Convenience function for running post-hoc pairwise t-tests for ANOVAoneSampleTTest Convenience function for running one-sample t-testpairedSamplesTTest Convenience function for running paired-samples t-testindependentSamplesTTest Convenience function for running independent-samples t-testgoodnessOfFitTest Convenience function for running a chi-square goodness of fit test against specified probabilitiesassociationTest Convenience function for running a chi-square test of association / independence between two categorical variablescolCopy Copy a vector into a matrixrowCopy Copy a vector into a matrixsortFrame Sort a data frametFrame Transpose a data frameexpandFactors Convert factors into a set of contrastsimportList Copy each element of a list to a new variablelongToWide Reshape a data frame from long to widewideToLong Reshape a data frame from wide to longpermuteLevels Permute the levels of a factorrmAll Remove all variables from the workspaceunlibrary Unload a packagewho Display the contents of the workspaceAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.