Skip to contents

[Experimental]
Print method for objects of class 'card'

Usage

# S3 method for class 'card'
print(x, n = NULL, columns = c("auto", "all"), n_col = 6L, ...)

Arguments

x

(data.frame)
object of class 'card'

n

(integer)
integer specifying the number of rows to print

columns

(string)
string indicating whether to print a selected number of columns or all.

n_col

(integer)
some columns are removed when there are more than a threshold of columns present. This argument sets that threshold. This is only used when columns='auto' and default is 6L. Columns 'error', 'warning', 'context', and 'fmt_fn' may be removed from the print. All other columns will be printed, even if more than n_col columns are present.

...

(dynamic-dots)
not used

Value

an ARD data frame of class 'card' (invisibly)

Examples

ard_categorical(ADSL, variables = AGEGR1) |>
  print()
#> {cards} data frame: 9 x 9
#>   variable variable_level   context stat_name stat_label  stat
#> 1   AGEGR1          65-80 categori…         n          n   144
#> 2   AGEGR1          65-80 categori…         N          N   254
#> 3   AGEGR1          65-80 categori…         p          % 0.567
#> 4   AGEGR1            <65 categori…         n          n    33
#> 5   AGEGR1            <65 categori…         N          N   254
#> 6   AGEGR1            <65 categori…         p          %  0.13
#> 7   AGEGR1            >80 categori…         n          n    77
#> 8   AGEGR1            >80 categori…         N          N   254
#> 9   AGEGR1            >80 categori…         p          % 0.303
#>  3 more variables: fmt_fn, warning, error