bruceR
BRoadly Useful Convenient and Efficient R functions that BRing Users Concise and Elegant R data analyses.
The package includes easy-to-use functions for (1) basic use and analysis; (2) multivariate computation; (3) reliability and validity analysis; (4) multi-factor analysis of variance (ANOVA), simple-effect analysis, and post-hoc multiple comparison; and (5) advanced toolbox and tidy report of statistical models.
Author
E-mail: baohws@foxmail.com
Website: psychbruce.github.io
ResearchGate | GitHub | 知乎
Citation
- Bao, H.-W.-S. (2021). bruceR: Broadly useful convenient and efficient R functions. R package version 0.x.x. https://CRAN.R-project.org/package=bruceR or https://github.com/psychbruce/bruceR
User Guide
Installation
## Method 1: Install from CRAN
install.packages("bruceR")
## Method 2: Install from GitHub
install.packages("devtools")
devtools::install_github("psychbruce/bruceR", force=TRUE, upgrade=FALSE)Tips:
- Please restart (close and reopen) RStudio before installation.
- If you see a dialog asking "Do you want to install from sources the package which needs compilation?", it would be better to choose "No" (to save your time).
- If you fail to install, please read carefully the warning messages and find out the key R package(s) causing the failure, manually uninstall and reinstall these R package(s), and then retry the main installation.
- It would be better to update R to its latest version (v4.0+).
- It would be better to download and install Rtools.exe on Windows system.
Package Dependency
bruceR depends on many important R packages.
Loading bruceR by library(bruceR) will also load these R packages for you:
[Data]:
rio: Data import and export (for all file formats).dplyr: Data manipulation and processing.tidyr: Data cleaning and reshaping.stringr: Toolbox for string operation (with regular expressions).forcats: Toolbox for factor manipulation (for categorical variables).data.table: Advanceddata.framewith higher efficiency.
[Stat]:
psych: Toolbox for psychological and psychometric research.emmeans: Toolbox for estimated marginal means and contrasts.effectsize: Indices of effect size and standardized parameters.performance: Assessment of regression models performance.
[Plot]:
Main Functions in bruceR
Basic Use and Analysis
set.wd()pkg_depend(),pkg_install_suggested()formatF(),formatN()Print(),Glue()Describe(),Freq(),Corr(),cor_diff()LOOKUP(),RANDBETWEEN()%notin%,%partin%,%allin%,%nonein%,%anyin%
Multivariate Computation
RECODE(),RESCALE()SUM(),MEAN(),STD(),MODE(),COUNT(),CONSEC()
Reliability and Validity Analysis
Alpha()EFA()CFA()
Multi-Factor ANOVA, Simple-Effect Analysis, and Post-Hoc Multiple Comparison
MANOVA()EMMEANS()
Advanced Toolbox and Tidy Report of Statistical Models
grand_mean_center(),group_mean_center()regress(),GLM_summary(),HLM_summary()model_summary()med_summary()ccf_plot()granger_test()
Theme for
ggplot2theme_bruce()
Learn More From Help Pages
library(bruceR)
## Overview
help("bruceR")
help(bruceR)
?bruceR
## See help pages of functions
## (use `?function` or `help(function)`)
?Describe
?Corr
?SUM
?MEAN
?MANOVA
?EMMEANS
?model_summary
?med_summary
?GLM_summary
?HLM_summary
...