mfreq: Mode value

mfreqR Documentation

Mode value

Description

Compute the sample mode.

Usage

mfreq(x, na.rm = FALSE, rounding = 2, grouped = TRUE, details = FALSE)

Arguments

x

R object (list) of class leem. Use new_leem() function.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

rounding

Numerical object. Rounds the values in its first argument to the specified number of decimal places (default 2).

grouped

Logical object. Determines whether the measure of position result will be based on grouped data or not (default TRUE).

details

Logical object. Details of data (default FALSE).

Examples

library(leem)
# set.seed(10)
x <- rnorm(36, 100, 50)
set.seed(10)
y <- rbinom(36, 10, 0.8)
w <- rep(letters[1:4], 1:4)
(tab1 <- y |> new_leem(variable = "discrete") |> tabfreq())
(tab2 <- x |> new_leem(variable = "continuous") |> tabfreq())
(tab3 <- w |> new_leem(variable = "discrete") |> tabfreq())
y |> new_leem(variable = "discrete") |> tabfreq() |> mfreq()
x |> new_leem(variable = "continuous") |> tabfreq() |> mfreq()
w |> new_leem(variable = "discrete") |> tabfreq() |> mfreq()


leem documentation built on April 3, 2025, 6:04 p.m.

Related to mfreq in leem...