Skip to contents

Add sampling data errors

Usage

sampling_error(var, type = "numeric")

Arguments

var

Vector of values to be modified

type

Type of data in the vector: accepts "character" or "numeric"

Examples

d <- data.frame(x = signif(rnorm(10000, mean = 0, sd = 100), digits = 4))
d$y <- sampling_error(d$x)
#> Warning: There was 1 warning in `dplyr::mutate()`.
#>  In argument: `var = dplyr::case_when(...)`.
#> Caused by warning:
#> ! NaNs produced