Function that assists other functions of leem package
Value
The variable
argument also allows using variable = 1
for categorical variable and variable = 2
for continuous variable.
Examples
# Example 1
library(leem)
x <- rbinom(36, 10, 0.6)
new_leem(x, variable = 1)
#> [1] 4 8 5 7 7 7 5 4 8 6 5 7 8 4 8 5 6 6 8 4 4 7 8 8 7 7 8 7 4 8 5 6 6 6 5 7
# Example 2 (Pipe operator)
rnorm(36, 100, 4) |> new_leem(variable = 2)
#> [1] 102.86640 101.76097 100.63532 102.63906 108.88208 95.26422 99.70418
#> [8] 98.33458 99.23407 100.27818 104.62139 102.37983 94.32142 93.57329
#> [15] 103.57170 100.59267 104.90811 96.95278 101.67750 95.84023 102.84630
#> [22] 97.46715 102.25270 102.64395 93.36780 104.11267 104.51181 94.87938
#> [29] 104.51547 98.14346 98.73696 103.69717 100.30858 104.15969 102.96754
#> [36] 105.02218