Last chance! 50% off unlimited learning
Sale ends in
table()
as Data FrameTakes the results from table()
and returns them as a data frame.
After the table()
results are made into a data frame, all the variables
are made into character columns, and the function also restores the
column types to their original classes. For strata
columns,
only observed combinations are returned.
.table_as_df(
data,
variable = NULL,
by = NULL,
strata = NULL,
useNA = c("no", "always"),
count_column = "...ard_n..."
)
data frame
(data.frame
)
a data frame
(string
)
a string indicating a column in data
(character
)
a character vector indicating columns in data
(character
)
a character vector indicating columns in data
(string
)
one of "no"
and "always"
. Will be passed to table(useNA)
.
cards:::.table_as_df(ADSL, variable = "ARM", by = "AGEGR1", strata = NULL)
Run the code above in your browser using DataLab