Code
library("rpt")
example_function(c(1, 2, 3, 4, 5))[1] 3
Code
example_function(c(1, NA, 3, 4, 5))[1] 3.5
This is an example function that demonstrates basic functionality. It validates, cleans, calculates statistics, and formats the result.
example_function(x)
x
|
A numeric vector |
The median of the input vector, rounded to 2 decimal places
library("rpt")
example_function(c(1, 2, 3, 4, 5))[1] 3
example_function(c(1, NA, 3, 4, 5))[1] 3.5