knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  message = F,
  warning = F
)

pmmisc

Lifecycle: experimental CRAN status

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...

Dependencies

Most functions require the following packages:

These packages should be installed prior to using this package.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("masurp/pmmisc")

Some usage examples

library(pmmisc)
library(dplyr)

# Get example data
d <- psych::bfi

Simple data descriptions

# Describe numeric variables
d %>%
  select(A1:A5) %>%
  describe_vars(first_col = "items")

# Describe factor variable
describe_factor(d$gender,
                name = "gender",
                useNA = "ifany")

Missing value analysis

# Count overall missings
count_na(d)

# Plot missingness patterns
missing_pattern_plot(d, var_labels = TRUE)


masurp/pmmisc documentation built on May 3, 2024, 7:13 p.m.