kableextra

Problems rendering table using r Markdown, kable and kableExtra

亡梦爱人 提交于 2020-03-19 06:24:50
问题 I am attempting to output a latex table using r markdown, kable and kableExtra. I get an error in the table rendering code that is not part of the latex code produced by R. The code: outTab <- m.OutTab %>% kable(format='latex', booktabs=T , #caption = "Population Trend", digits=1, row.names=FALSE, align='lccccc', col.names = names_spaced, escape = FALSE) where "m.OutTab" is an matrix that contains the table to be rendered, The error: Error producing PDF. ! Misplaced \noalign. \addlinespace ->

Table in Bookdown/Huskydown with several features (Citation, Caption, URL, PNG Figure, …)

ぃ、小莉子 提交于 2020-03-10 04:39:24
问题 I would like to include a table in an R markdown document (Bookdown/Huskydown) which should meet the following requirements. Ideally, the table works with several output formats, e.g. LaTex/PDF and HTML. Requirements: Table width: fixed Cell width: fixed Vertical alignment: cell content aligned to the top Text formatting: like bold or italics (best would be if md formatting supported, such that code is output agnostic) and allow for line breaks in longer texts Citations: should be rendered

Table in Bookdown/Huskydown with several features (Citation, Caption, URL, PNG Figure, …)

拈花ヽ惹草 提交于 2020-03-10 04:39:08
问题 I would like to include a table in an R markdown document (Bookdown/Huskydown) which should meet the following requirements. Ideally, the table works with several output formats, e.g. LaTex/PDF and HTML. Requirements: Table width: fixed Cell width: fixed Vertical alignment: cell content aligned to the top Text formatting: like bold or italics (best would be if md formatting supported, such that code is output agnostic) and allow for line breaks in longer texts Citations: should be rendered

kable/kableExtra Add superscript to group labels in group_rows

百般思念 提交于 2020-03-03 11:33:08
问题 I have a table that I am creating for a pdf presentation using kable and kableExtra. I am wanting to group the rows and I need to use superscripts in the row group labels. I have tried several different things. Here is an example of some of the methods I have tried so far. library(kable) library(kableExtra) foo <- data.frame(a = 1:10, b = 11:20, c = 21:30) kable(foo, format = "latex", booktabs = T, row.names = FALSE, linesep = "", escape = FALSE) %>% kable_styling(latex_options = c("striped")

kable/kableExtra Add superscript to group labels in group_rows

折月煮酒 提交于 2020-03-03 11:32:02
问题 I have a table that I am creating for a pdf presentation using kable and kableExtra. I am wanting to group the rows and I need to use superscripts in the row group labels. I have tried several different things. Here is an example of some of the methods I have tried so far. library(kable) library(kableExtra) foo <- data.frame(a = 1:10, b = 11:20, c = 21:30) kable(foo, format = "latex", booktabs = T, row.names = FALSE, linesep = "", escape = FALSE) %>% kable_styling(latex_options = c("striped")

How to make kable table reactive() in shiny app? Shiny + kable

天大地大妈咪最大 提交于 2020-01-22 19:31:32
问题 I am trying to make kable table reactive and export it in shiny app. already gave a try with renderDataTable / renderTable inside server and output functions as datatableOutput / tableOutput , but of no luck and following is the line of code. output$tableset <- renderDataTable({ kable(spread_bole) %>% kable_styling(font_size = 15 ,bootstrap_options = c("striped","hover", "condensed")) }) tableOutput("tableset") 回答1: Since kable returns HTML, you can render your table using htmlOutput in ui

Why does rendering a pdf from rmarkdown require closing rstudio between renders?

[亡魂溺海] 提交于 2020-01-09 13:09:50
问题 Background I am trying to make a rmarkdown document that is rendered using render() . The render call has two elements that are parameterized: I would like the user to be able to specify pdf or html. Straightforward using output_format() . I also would like to pass a parameter to the document to specify if the tables (using the kableExtra package) are latex or html. This is the rmarkdown file called test.Rmd --- title: "Title" author: "Zzz Zzzzzz" params: table_format: value --- ```{r setup}

Why does rendering a pdf from rmarkdown require closing rstudio between renders?

痴心易碎 提交于 2020-01-09 13:07:47
问题 Background I am trying to make a rmarkdown document that is rendered using render() . The render call has two elements that are parameterized: I would like the user to be able to specify pdf or html. Straightforward using output_format() . I also would like to pass a parameter to the document to specify if the tables (using the kableExtra package) are latex or html. This is the rmarkdown file called test.Rmd --- title: "Title" author: "Zzz Zzzzzz" params: table_format: value --- ```{r setup}

Why does rendering a pdf from rmarkdown require closing rstudio between renders?

谁说胖子不能爱 提交于 2020-01-09 13:07:08
问题 Background I am trying to make a rmarkdown document that is rendered using render() . The render call has two elements that are parameterized: I would like the user to be able to specify pdf or html. Straightforward using output_format() . I also would like to pass a parameter to the document to specify if the tables (using the kableExtra package) are latex or html. This is the rmarkdown file called test.Rmd --- title: "Title" author: "Zzz Zzzzzz" params: table_format: value --- ```{r setup}

R Using kableExtra to colorize cells and maintain striped formatting with nested if/ifelse?

穿精又带淫゛_ 提交于 2020-01-06 08:09:22
问题 An expansion to this question: R wanting to limit the amount of digits from csv file I am using kableExtra and cell_spec to colorize cells with nested ifelse statements. Instead of colorizing values less than .10 white, I want to leave them alone in order to allow kableExtra to apply the striped formatting. I have a feeling this isn't possible though because of how the background colors are applied? DF: DF <- data.frame(V1 = sample(letters,10,T), V2 = abs(rnorm(10)), V3 = abs(rnorm(10))) Code