Convenience function to display N

label_n(x, brackets = FALSE)

Arguments

x

Data or singular value.

brackets

Set TRUE to enclose result in ( ).

Value

A character of length 1.

Examples

label_n(100)
#> [1] "N = 100"
label_n(tibble::tibble(x = 1:10, y = 1:10), brackets = TRUE)
#> [1] "(N = 10)"