Questions tagged [huxtable]

44 questions
0
votes
0 answers

R Huxtable position

I'm using Huxtable for tables in markdown documents (printed in PDF) My problem is that that when I knit the document, all my tables are in the end of the document not in the middle of the text. Is there any way to use such thing as booktab = T in…
user17465205
  • 53
  • 1
  • 4
0
votes
1 answer

huxtable footnote: how to set bold, italic etc. - html coding does not work

If you set a caption: set_caption("...") html codes like "b, i, font size" and so on are working But with add_footnote("...") this isn`t true anymore, it just prints the html code as text Does someone know how to fix this. Or how to style the…
redhill
  • 1
  • 1
0
votes
0 answers

webshot2::webshot is trimming the right side off of a huxtable in R

I am trying to convert an html table created in R via the huxtable package to a png file using webshot2::webshot. Unfortunately, the very right side of the output seems to get trimmed off and I can't figure out how to fix this generically. I don't…
Patrick
  • 742
  • 7
  • 19
0
votes
1 answer

How do I remove a footnote from a huxtable in R?

Once a footnote has been set via add_footnote it seems like its hard to get rid of again. library(magrittr) library(huxtable) jams <- hux( Type = c("Strawberry", "Raspberry", "Plum"), Price = c(1.90, 2.10, 1.80) ) %>% add_footnote("Tasty…
Patrick
  • 742
  • 7
  • 19
0
votes
1 answer

Rmarkdown PDF tables, merge cells and return to line

I am trying to integrate a survey in my pdf report, the survey is composed of three columns; one with the code, the second with the question and the third with the possible answers. I would like to get a result more or less like…
stehu
  • 27
  • 4
0
votes
2 answers

Nice looking tables in both base R and RStudio notebooks

I want my function to print nice-looking tables, whether it's called from base R or from an RStudio Notebook (.Rmd file). The function should figure out where it's being called from, and adjust the table accordingly. I want the function to be easy…
Jessica
  • 113
  • 4
0
votes
1 answer

Exponentiate regression results in huxtable

I'm putting together some tables with results from a series of Cox Proportional Hazards Models. I'd like to exponentiate the coefficients so the tables display the Hazard Ratios rather than the raw beta values. Does anyone know of a way to do this…
rosie
  • 13
  • 2
0
votes
2 answers

Save huxtable in R to file in LaTex format

How can I save a huxtable to a file in LaTeX (.tex) format? I did find this code to print LaTeX tables to the console: library(huxtable) ht <- huxtable( a = 1:3, b = letters[1:3] ) print_latex(ht) Does the huxtable package…
captain
  • 543
  • 1
  • 3
  • 20
0
votes
1 answer

How to color the required cells in the table using "huxtable" library in R. Which is more elegant way to do it?

I need to mark some special cells in the table with a gray color. Something like this: ```{r} library(huxtable) library(magrittr) sample_df <- data.frame(matrix(1:25, nrow = 5)) sample_df %>% as_huxtable() %>% set_all_borders(1) %>% …
0
votes
1 answer

print_md in huxtable changes table formatting

I am using the huxtable package to create tables in a PDF rendered in bookdown. The table is formatted exactly the way I want it, up until I run the print_md command, after which a border is moved up row from underneath the column names to…
mvanaman
  • 171
  • 11
0
votes
0 answers

saving huxtable to word loses the number formatting

I have created a table of my data in r using huxtable. The formatting of the numbers is very important and conditional across the table. In r, when I look at my huxtable the formatting is perfect. When I use quick_docx to save it to work, it changes…
maiebee
  • 22
  • 1
0
votes
1 answer

Using huxtable labels in RMarkdown for PDF

I am using huxtable to display tables in RMarkdown for output: pdf_document. When I put a label in the table huxtable(mytable) %>% set_label("tab:mylabel") and then make a reference in the body text like See Table \@ref(tab:mylabel) for more…
user1683586
  • 373
  • 2
  • 12
0
votes
2 answers

Formatting numbers with hugrex function in huxtable

Function huxreg in the huxtable package automatically recognises numbers and formats them as predefined in the number_format = "%.3f" option. I would like to report confidence intervals in my report and use the CI95: prefix. Unfortunately, the…
Lstat
  • 1,450
  • 1
  • 12
  • 18
-1
votes
1 answer

How can I have a line Break in the column headings in R huxreg when exporting to latex?

Here is a minimal example. library(huxtable) model1 <- lm(mpg ~ cyl + disp, data = mtcars) huxreg1<-huxreg("This is a tool long title \n for one row"= model1) print_latex(huxreg1) When looking at the html output, the line break works. However…
SKupek
  • 63
  • 6
1 2
3