Questions tagged [kable]

Create Tables In LaTeX, HTML, Markdown And ReStructuredText

A function from R knitr package by Yihui Xie.

This is a very simple table generator. It is simple by design. It is not intended to replace any other R packages for making tables.

Related tags:

795 questions
0
votes
0 answers

Nice looking rendering of "summaryDefault" objects in R/Knitr

I am trying to make some reports with Rmarkdown, and one of the things I would like to display in nice, formatted text is results of the summaryDefault type object. I have tried using Kable and XTables, but neither seems to be up to the task. With…
Stonecraft
  • 860
  • 1
  • 12
  • 30
0
votes
2 answers

Transposing Dataframe post aggregation

I am having some difficulty transposing my data correctly. I am trying to get a list of column's mean and sd where the column names are now rows. I was able to create the means and sd with the code below: data(iris) mydata <- do.call(data.frame,…
Jbnimble
  • 39
  • 7
0
votes
1 answer

Creating Tables Iteratively with different columns

I am trying to create a series of tables by group and I would like to have each table run iteratively with a different variable. I would also like to add the p-value from an anova to the bottom of the table. I am able to do a single table easily…
Jbnimble
  • 39
  • 7
0
votes
1 answer

Trouble with dataframes from nested lists with Knitr

I have a list called ct2 from doing a webscrape. I can name the columns on non-nested lists with the below code. However I want to add the coordinates and when I call head(ct2$business) I see ct2$business$coordinates$latitude and…
Turbogoon
  • 17
  • 5
0
votes
1 answer

Call to pdflatex in R/knitr constantly brings up new errors

I'm trying to print the results of a data frame as a table in a PDF using knitr, and more specifically kable. When I pass the data frame using kable(df, format = 'latex') it produces a basic, unformatted table. As soon as I try to add any styling…
Nicholas Hassan
  • 949
  • 2
  • 10
  • 27
0
votes
1 answer

kable_as_image knitr/kableextra rmarkdown

I am trying to use the function kable_as_image, which from my understanding will save the table as a image. My results though is not a table, dont know if I am doing something wrong as I cant find an example. --- title: "Untitled" author:…
MLEN
  • 2,162
  • 2
  • 20
  • 36
0
votes
1 answer

Pandoc Conversion Failure With Knitr

I think my problem is straightforward enough that it can be answered without a MRE. Here's the code that's throwing an error: DSP %>% kable(format = "latex", digits = 2, booktabs = T, format.args = list(big.mark = ',')) %>% …
Steve
  • 575
  • 4
  • 18
0
votes
1 answer

R-Markdown - kableExtra package - format = 'latex' not working

Using the kableExtra documentation. inside RMardown I am running: ```{r} library(knitr) library(kableExtra) dt <- mtcars[1:5, 1:6] kable(dt, format = "rmarkdown") ``` this actually outputs a table but I also get the following in the console: …
Alex Bădoi
  • 830
  • 2
  • 9
  • 24
0
votes
0 answers

Appending blank rows in table using kable function from knitr

The kable function from knitr R package add blank row after every five rows by default. knitr::kable(mtcars, format = "latex", booktabs = TRUE) I wonder if there is a way to change this specification?
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
0
votes
2 answers

kable prints stargazer table with multiple lines

I want to print stargazer table using kable. When I am running the code in markdown, I get the stargazer table but with multiple lines with the sign | between those lines before the table. I also get a warning message at the beginning: Warning in…
michal
  • 1
  • 2
0
votes
1 answer

kableExtra: Put a few rows of a table into many categories programmatically

Currently kableExtra 0.5.1 only supports Put a few rows of a table into one category. I wonder if there is any tweak to Put a few rows of a table into many categories programmatically like group_rows(kable_input = x, group_label = c("Group 1",…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
0
votes
1 answer

Not showing NAs in knitr::kable output as do xtable

I want to omit NAs in the output of knitr::kable output same as the xtable do (See kable and xtable outputs below). fm12anova <- structure(list(SOV = c("Days", "Residuals"), Df2 = c(1L, 178L ), Sum.Sq2 = c(162702.651909532, 405251.617480465),…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
-1
votes
1 answer

How can i make the first col aligned to left and the rest aligned to center with kable table

I try to make table and want to make the first col aligned to left and the rest aligned to center. It seems like no align option for col_spec. how should I do? Here are the sample codes that I made: x<-data.frame("Name"=c("test", "try"),"SN"=1:2,…
Stataq
  • 2,237
  • 6
  • 14
-1
votes
1 answer

How to print a character vector 'pretty' in R Markdown?

Is there a function such as kable to output character vectors in a way that doesn't look as ugly as the default console type?
Carmen Sandoval
  • 2,266
  • 5
  • 30
  • 46
1 2 3
52
53