However, the recent updates in fancyvbr causes a clash in xcolor option. Note: kableExtra was using xcolor with the table option for alternative row color before 1.0. You can disable this behavior by setting options(to_format = FALSE) before you load kableExtra. I just hope you can enjoy a peace of mind in most of your time. You can manually set any format in kable() whenever you want. I'm still including the explanation above here in this vignette so you can understand what is going on behind the scene. You no longer need to manually set either the global option or the format option in each kable() function. Unless you are rendering a PDF, kableExtra will try to render a HTML table for you. Starting from kableExtra 0.9.0, when you load this package ( library(kableExtra)), it will automatically set up the global option '' based on your current environment. You can also define a global option at the beginning using options( = "html") so you don't repeat the step everytime. As a result, when you have such a need, you should define format in kable() as either "html" or "latex". For example, if you want to have a double-row header table, markdown just cannot provide you the functionality you need. However, markdown doesn't support complex table. If you switch from HTML to pdf, you basically don't need to change anything in your code. This is the most favorable approach to render most simple tables as it is format independent. When you are using kable(), if you don't specify format, by default it will generate a markdown table and let pandoc handle the conversion from markdown to HTML/PDF. It's here only for education purpose because it's helpful to understand how kable works under the hood. In this doc, we will use kbl instead of kable. I encourage you start to use the new kbl function for all its convenience but the support for the original kable function is still there. As a result, it also solves an issue for multi-format R Markdown documents. It also does auto-formatting check in every function call instead of relying on the global environement variable. Key Update: In the latest version of this package (1.2+), we provide a wrapper funciton kbl to the original kable function with detailed documentation of all the hidden html/latex options. xtable2kable: Convert xtable to a kable object.xml_as_kable: Convert XML back to kable.spec_pointrange: Helper functions to generate inline sparklines.spec_plot: Helper functions to generate inline sparklines.spec_image: Setup image path, size, etc. spec_hist: Helper functions to generate inline sparklines.spec_font_size: Generate common font size for continuous values.spec_color: Generate viridis Color code for continuous values.spec_boxplot: Helper functions to generate inline sparklines.spec_angle: Generate rotation angle for continuous values.scroll_box: Put a HTML table into a scrollable box.row_spec: Specify the look of the selected row.reexports: Objects exported from other packages.make_inline_plot: Combine file (or svg text) and parameters into a.magic_mirror: Magic mirror that returns kable's attributes.listify_args: Convert arguments for a single call into Map-able args.linebreak: Make linebreak in LaTeX Table cells.landscape: Print the table on an isolated landscape page in PDF.kableExtra_latex_packages: LaTeX Packages.html_dependency_lightable: HTML dependency for lightable.html_dependency_kePrint: HTML dependency for js script to enable bootstrap tooltip and.html_dependency_bsTable: HTML dependency for Twitter bootstrap (table only).header_separate: Separate table headers and add additional header rows based.group_rows: Put a few rows of a table into one category.graphics_helpers: Helper functions to use various graphics devices.footnote_marker_number: Footnote marker.column_spec: Specify the look of the selected column.collapse_rows: Collapse repeated rows to multirow cell.auto_index: Automatically figuring out the group_row index.as_image: Render the table as an format-independent image and use it in.add_indent: Add indentations to row headers.add_header_above: Add a header row on top of current header.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |