modulo: modulo

View source: R/modulo.R

moduloR Documentation

modulo

Description

Applies a modulo operation with a specified base resolution

Usage

modulo(x, res = 1, center = TRUE)

Arguments

x

Numeric vector to scale.

res

Base resolution to scale x to using a modulo operation.

Value

Scaled vector.

Examples

runif(100, 0, 100) %>%
 tibble::as_tibble() %>%
 dplyr::mutate(mod = modulo(value, 15))


toddellis/miao documentation built on June 1, 2025, 10:11 p.m.