395 questions
0
votes
1
answer
133
views
General approach to line wrapping in R markdown tables
When including a table in a Rmarkdown document, I would like to enable automated line wrapping for tables that are wider than the page.
There are some questions facing similar issues, like here, here, ...
0
votes
1
answer
246
views
How to format table cells in R Quarto HTML document (xtable)
I created an HTML-based R-Quarto document running on the knitr engine. In the example below, I set up the document, include dplyr, and try to format cells of mtcars that are above the column's average ...
1
vote
0
answers
73
views
Why is my table empty when i print it to an html file?
I have run into some issues with printing tables to html files using R. When I view the file in R, everything looks fine but when I use print(), the file becomes empty:
Table_3 <- cbind(...
0
votes
2
answers
78
views
How can I use gsub in a user-supplied input to xtable's sanitize.text.function argument?
I have a table of summary statistics created in R. Rows correspond to variables, columns to different samples. I want to export this table to Latex using the xtable package. However, some variables ...
1
vote
1
answer
260
views
How to align xtable output columns?
I'm looking for something that should be quite simple, but I cannot find a way to do this. Very frustrating that there is no easy-to-follow documentation on xtable.
I have a dataframe:
> df <- ...
0
votes
1
answer
183
views
How to export coxme regression output to Latex?
I have the results of a regression from a coxme model in R, and would like to export it as a Latex table. How do I do this?
Code:
> library(coxme)
>
> m1 <- coxme(Surv(exit, status) ~ 1 + (...
0
votes
0
answers
192
views
Manually manipulate latex output from modelsummary/stargazer/xtable
So I guess there are multiple ways of doing this but they are all giving me headache.
Let's say I have produced the latex code for a table using.
library(modelsummary)
library(tidyverse)
a <- lm(...
2
votes
0
answers
279
views
How to include output from etable() of fixest package as latex regression table into markdown as html output?
I would like to include the regression output from etable(feols(fml = formula, data = data, cluster = ~cluster)) as latex regression table into an rmarkdown creating an html output.
My regression ...
1
vote
0
answers
520
views
Export "mediate" output to LaTeX table [duplicate]
I have a model summary from a mediation::mediate call, which I would like to export to LaTeX. Consider this example (from the documentation).
# install.packages("mediation")
library("...
2
votes
0
answers
128
views
knitr xtable with long head note too long, stretch out the entire table
I'm new to knitr and Latex stuff, so this may be a very naive question, but I failed to find a correct answer.
I'm doing empirical research that sometimes, we need to add headnotes as instruction for ...
0
votes
0
answers
130
views
Display column with histograms from skimr when using xtable()
Could I also display the column with the histograms when creating the xtable from
SK<-data.frame(skimr::skim(iris[,1:4]))
to
htmlTable::htmlTable(xtable(SK, result="html"))
0
votes
1
answer
692
views
Problems forming a LaTeX table using xtable-package in R
I would like to form the following LaTeX-table with xtable-package in R.
Table 1: Wanted LaTeX table
However, I do not understand how to add multiple extra rows to xtable-function to get above table.
...
1
vote
1
answer
171
views
Trying to create a table using xtable giving result iside html tags
Im trying to create an elegant table as described here but I get the result inside html tags instead of a table.
library(xtable)
# x is a matrix containing the data
# method : correlation method. &...
0
votes
1
answer
155
views
returning print xtable from a function includes escaped characters knitr r
I'm trying to build tables in knitr using xtable.
Some tables have multilevel column names
I'm building the tables in functions and storing the output of the functions as variables
these table ...
0
votes
0
answers
42
views
How to avoid that xtable flips the x and y axis of a table in the final output?
I work with xtable which turns a table of r into a functionable latex code.
<<echo=false>>=
attach(warpbreaks)
p2 <- round(tapply(breaks, list(tension), mean), digits=2) %>%
as....