![]() ![]() ![]() Here is what I want would look like the table to look like (made in Word): I am struggling to sort the vertical centering (the space between 'Number of Incident Occurences' on the top and bottom, so that. Here is some example reproducible code of the problem. I am authoring a report using RMarkdown, and using kable and kableExtra to format and print the table. I added the float package in my YAML, but how do I use the ?įor figures, I could use the knitr option fig.pos = "H", but this didn't work for the table. For those who are familiar with LaTeX, hold_position uses and HOLD_position uses and the float package. If you find hold_position is not powerful enough to literally PIN your table in the exact position, you may want to use HOLD_position, which is a more powerful version of this feature. Tables are center-aligned by default when they are included in a table environment (i.e., when the table has a caption). Other packages for formatting tables, among others, include the gt. For example: If your title depends on an R variable created later in the document, you. This means some YAML metadata can be dynamically generated with inline R code, such as the document title. It doesn't place the table where I want it, so I want to try the stronger option in the kableExtra documentation: The kable() function from the knitr package and Functions from the kableExtra package. You can use inline R code (see Section 3.1) anywhere in an Rmd document, including the YAML metadata section. Kable_styling(latex_options = "hold_position") I used kableExtra to make the table and it looks like this: kable(site_info, "latex", caption = "Site Information", booktabs = T, align = "c") %>%Ĭollapse_rows(columns = 1, latex_hline = "major", valign = "middle")%>% ![]() I am trying to get a table in an Rmarkdown pdf to stay in the right place. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |