powered by
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.
tangram.pipe
n_row( list_obj, col_var = NULL, newdata = FALSE, missing = NULL, overall = NULL )
A list with the row counts added as a new element to list_obj.
list_obj
the name of the tbl_start object previously initialized.
the variable to be used in the table columns. Default is from initialized tbl_start object.
enter new dataset name if different from that initialized in tbl_start.
logical: if TRUE, missing data in the column variable is considered; FALSE only uses complete cases.
logical: if TRUE, an overall column is included.
Other related row-building functions: num_row, cat_row, binary_row, empty_row
Starting a tangram.pipe table: tbl_start
x <- tbl_start(iris, "Species", missing=TRUE, overall=TRUE, comparison=TRUE) %>% n_row()
Run the code above in your browser using DataLab