rubenarslan/codebook

selecting columns of codebook table

sdaza opened this issue · 3 comments

sdaza commented

Hey, great package! Thank you for all your work!

I would like to select in the function codebook_table the columns of the table generated.

order <- c("name", "label", "type", "type_options", "data_type", "ordered",
"value_labels", "optional", "showif",
"scale_item_names",
"value", "item_order", "block_order", "class",
"missing", "complete", "n", "empty", "n_unique",
"top_counts", "count", "median", "min", "max",
"mean", "sd", "p0", "p25", "p50", "p75", "p100", "hist")

Is there already a way to do it?

Thanks again!

The function codebook::codebook_table gives you this table. You can then operate on it. So, if you want to customise the table, I would suggest running the codebook with the table argument set to false (codebook::codebook(yourdata, metadata_table = F)), then print the customised table yourself wherever you want it.

sdaza commented

The same for codebook_items?