n_row {tangram.pipe} | R Documentation |
Row counter
Description
Counts the instances of each column variable of the dataframe to be used in
a tangram.pipe
table (if applicable), and gives an overall row count.
Usage
n_row(
list_obj,
col_var = NULL,
newdata = FALSE,
missing = NULL,
overall = NULL
)
Arguments
list_obj |
the name of the tbl_start object previously initialized. |
col_var |
the variable to be used in the table columns. Default is from initialized tbl_start object. |
newdata |
enter new dataset name if different from that initialized in tbl_start. |
missing |
logical: if TRUE, missing data in the column variable is considered; FALSE only uses complete cases. |
overall |
logical: if TRUE, an overall column is included. |
Value
A list with the row counts added as a new element to list_obj
.
See Also
Other related row-building functions: num_row, cat_row, binary_row, empty_row
Starting a tangram.pipe
table: tbl_start
Examples
x <- tbl_start(iris, "Species", missing=TRUE, overall=TRUE, comparison=TRUE) %>%
n_row()
[Package tangram.pipe version 1.1.2 Index]