What it does
rwf is an R package designed to streamline statistical reporting and enhance visualizations for commonly used methodologies in psychology. By automating code-heavy tasks using well-known R packages, rwf helps researchers and data scientists save time and reduce coding complexity.
Features
- Statistical reporting for ANOVA, regression, t-tests, and more.
- Intuitive visualizations: ROC curves, histograms, scatterplots, and interaction plots.
- Support for advanced modeling: CFA, IRT models, Thurstonian scales.
- Simulated datasets for practice and demonstration.
Installation
1. Install R
Download R 3.5 or newer from CRAN, for Windows, macOS or Linux, and run the installer.
2. Install RStudio or Positron
An editor makes R easier to use. It is optional, and both are free, from Posit:
- RStudio Desktop
- Positron, which also runs Python
3. Install rwf
Run one of these in RStudio, Positron or the R console. Each one also installs the packages rwf needs.
From R-universe (recommended)
install.packages(
"rwf",
repos = c("https://sedzinfo.r-universe.dev", "https://cloud.r-project.org")
)R-universe builds rwf from this repository after every change, ready to install on Windows, macOS and Linux, and CRAN provides the packages it needs.
From GitHub
install.packages("pak") # once
pak::pak("sedzinfo/rwf/rwf")From the release tarball
The latest release has the source tarball and the PDF manual, rebuilt from main on every change:
install.packages("pak") # once
pak::pak("url::https://github.com/sedzinfo/rwf/releases/download/latest/rwf_0.1.0.tar.gz")From a clone of the repository
Use this path when you want the whole repository, including the files outside the package, such as the raw data in data/ and the archived packages in working_functions/PACKAGES/.
1. Install Git, once per computer.
2. Clone the repository:
3. Install the package from the clone:
install.packages("pak") # once
pak::local_install("path/to/rwf/rwf")To update it later, run git pull in the clone, and install again.
Usage
library(rwf)
x <- df_insurance[, c("age", "bmi", "charges")]
correlations <- report_correlation(x, scatterplot = FALSE)
correlations$r_lower # also the p values, confidence intervals, sample sizes, ...
report_correlation(x, scatterplot = FALSE, file = "correlations")
# saves the tables in correlations.xlsx and the plot in correlations_corrplot.pdfMost report_* functions take a file argument in the same way. Every function has a help page with examples, and the articles work through each method with its output.