knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", message = F, warning = F )
This package includes some custom-made functions to facilitate some common data wrangling procedures as well as common computations in descriptive analyses. Please note that most functions are highly costumized to my own workflow. They may hence break in more general frameworks or when used in a different way...
Most functions require the following packages:
tidyverse
and magrittr
papaja
psych
gridExtra
These packages should be installed prior to using this package.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("masurp/pmmisc")
library(pmmisc) library(dplyr) # Get example data d <- psych::bfi
# Describe numeric variables d %>% select(A1:A5) %>% describe_vars(first_col = "items") # Describe factor variable describe_factor(d$gender, name = "gender", useNA = "ifany")
# Count overall missings count_na(d) # Plot missingness patterns missing_pattern_plot(d, var_labels = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.