pct_change: Calculate the percent change between two values or vectors of...

View source: R/pct_change.R

pct_changeR Documentation

Calculate the percent change between two values or vectors of values

Description

Calculate the percent change between two values or vectors of values

Usage

pct_change(start, final, perc = FALSE)

Arguments

start

A value or vector of values

final

A value or vector of values

perc

A logical indicating whether or not to format the value with a percent symbol

Examples

tibble::tibble(
 start = seq(0.1, 1.1, 0.1),
 final = sample(seq(0.1, 1, 0.1), 11, replace = TRUE)
 ) %>%
dplyr::mutate(pct_diff = pct_change(start, final))

overdodactyl/mRclwhip documentation built on June 30, 2023, 6:24 a.m.