dsct_transform(integers(), fun = pnorm, inv = qnorm, range = c(0, 1))
dsct_transform(
as_discretes(0:3),
fun = cos,
inv = acos,
domain = c(0, pi),
range = c(-1, 1),
dir = "decreasing"
)
# For numeric inputs, function is applied directly.
# Other arguments beyond `fun` get absorbed in `...` and are not used.
dsct_transform(0:5, exp)
dsct_transform(0:5, exp, log)
Run the code above in your browser using DataLab