rubenarslan / codebook

Cook rmarkdown codebooks from metadata on R data frames
https://rubenarslan.github.io/codebook/
Other
142 stars 16 forks source link

selecting columns of codebook table #28

Closed sdaza closed 5 years ago

sdaza commented 5 years ago

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!

rubenarslan commented 5 years ago

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 5 years ago

The same for codebook_items?

rubenarslan commented 5 years ago

codebook_items returns an Rmarkdown partial – you can no longer edit the table attributes in R. But you can have a look at the code with codebook:codebook_items – it just calls codebook_table and makes some links. Then build on this!

On Mon, Feb 4, 2019 at 5:27 PM Sebastian Daza notifications@github.com wrote:

The same for codebook_items?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rubenarslan/codebook/issues/28#issuecomment-460313517, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyuhUGAg7W404hTCHNTBcveGbx128sWks5vKF9bgaJpZM4agiQZ .