Questions tagged [xtable]

A library for R that exports tables from R data in LaTeX (and/or html) format. Please do not use this for xtables in ConTeXt which should be tagged extreme-tables.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

How to replace numbers with centered strings in dcolumn table?

In a table produced by the texreg::texreg() function in R I want to replace numerical values with strings. The purpose is to summarize values of a bunch of control variables with a single line and a ...
0
votes
1answer
28 views

R studio cannot make xtable

library(xtable) library(magrittr) library(moonBook) options(ztable.type="html") a=mytable(head(iris)) a x = xtable(a) x i cannot make xtable, just use mytable... want to use xtable, but output like ...
1
vote
1answer
149 views

This code is not executing in the documentclass [journal]{IEEEtran}?

\documentclass[journal]{IEEEtran} \hyphenation{Smart Grid} \usepackage{subfloat} \usepackage{subcaption} \usepackage{graphicx} \usepackage{color} %for colors \usepackage{epstopdf} \usepackage{url} \...
1
vote
1answer
121 views

How to put table in full page when paper format is double column

I am using the double-column paper format, and I've two requirements as follows. First, I need my table to be spanned over the whole width of the document not just one column. Second, if a table is ...
0
votes
1answer
42 views

Scaling output from stable output

print(xtable(x, type = "latex"), floating = FALSE, tabular.environment = "longtable", file = "/Path/Filename.tex") I am using the above code to output a table directly from R. I am using ...
2
votes
1answer
238 views

Getting R xtable to display within a LaTex 'minipage'

I have the following piece of R-markdown / latex / minipage combo code. What I am trying to do is get the xtable output to display within the minipage, along with other text paragraphs surrounding it....
1
vote
2answers
299 views

Runaway argument constructing a tabularx simple table

I want to reproduce this kind of table: I tried writing down this code: \documentclass{article} \usepackage{tabularx,booktabs} \begin{document} \newcolumntype{Y}{>{\centering\...
1
vote
0answers
182 views

R Sweave: print very large dataframe sample which spans on multiple pages inside a floating environment

I'm using R Sweave to output an R document into a LaTeX file through R Studio on a Windows 7. I have a very large data frame from which I have to put a sample at the begin of my document. I use xtable ...
5
votes
2answers
4k views

How to manually make tables using booktabs

I am really new in the use of LaTex and would like some help to make this table using booktabs formatting. I use R and would ideally generate it using xtables package. However, I could not deal with ...
2
votes
2answers
2k views

Missing $ inserted. ^^I^^I &\square

I am new to LaTeX and I am using it to write a questionnaire like this: My current code is the following: \begin{enumerate} \item Statement one. \begin{tabular}{c c c c c c c} \...
1
vote
1answer
762 views

Splitting table in multiple pages in Elsevier journal format (elsarticle.cls)

I am not able to accommodate my table in Elsevier journal manuscript format, so I need to split the table. Since the table has too many columns I rotate the table 90 degree(anticlockwise). And also ...
3
votes
1answer
135 views

Increment Regression Models

I often show regressions tables during presentation and I was wondering if there is a simple way to increment regression models. For instance, I would like to first display model 1 (1) and then ...
1
vote
0answers
1k views

Specify multiple notes of a table by xtable

I want to create a table which may contain multiple notes like : which I found here. This works fine in a pure LaTeX context, yet I'm using knitr to convert my Rnw files (under R) to pdf, because ...
4
votes
1answer
659 views

Removing all hlines in xtable generated longtables

Even by setting hline.after = NULL, a longtable generated by the R package xtable still mantains an hline at the very end of the table. \documentclass{article} \usepackage{longtable} \begin{...
2
votes
1answer
79 views

Is it possible to use cite inside xtable?

If I had a table stored in a data frame: library(xtable) tbl <- data.frame(Name=c("A", "B"),Source=c("\\cite{a}", "\\cite{b}")) tab <- xtable(tbl) print(tab) how would I go about producing a ...
0
votes
1answer
1k views

Including greek letters when saving matrix from R to .tex table

How does one save a table with Greek letters in R, so that LaTeX recognizes and outputs the Greek letters when the table is called in LaTeX ? I am using R to output a table of results, save the ...
3
votes
1answer
157 views

Context - TABLE commands in body of document affecting TABLEs in header

I am trying to use a TABLE as a header in Context (see Using a table as a header in Context). However, the \setupTABLEs and \bTABLE[head|foot]s commands in the body of the document affect the TABLE in ...
2
votes
1answer
97 views

IEEEtran: Inserting a table into an 2 column document

I'm trying to insert a table into my IEEEtran document. Following tables I have created with Excel. Here is my IEEEtran code. Can someone tell me how I can create my table into following code? \...
1
vote
1answer
233 views

How to make multirow “footnote row” for dominating cell in LaTeX Table?

I want to minimise the dominating effect of big cells in tables within a table by the following have two major rows for each row where a dominating row such that the dominating cell will take place ...
1
vote
1answer
88 views

Problem with some \omit and a table within itemize

Good morning/afternoon/evening I have got this source code, below. The result is on the picture on the left. Why is the mark (the black circle) below the table? How to fix it? I want to have got the ...
1
vote
0answers
993 views

R xtable and table width

I have to fit a table with many columns to the width of a page, using xtable and longtable environment. My R code is library(xtable) data <- matrix( data = 1000000000, ncol=14, nrow = 100) x....
3
votes
1answer
1k views

How to change row height within xtable environment?

I would like to change row height such that all rows except the header row will have fix height x and the header row will have eight y. I would like to do this within xtable environment because I ...
1
vote
0answers
597 views

general footnotes in xtable

I am using sweave to create pdf. Using xtable, I am trying to insert a general footnotes under the table (i.e: This symbol means bla bla bla). I've tried a lot of things and everything get me an error ...
1
vote
1answer
193 views

make the TeX xtable results well formatted and easier to read

Is there a way to make the TeX xtable source code results well formatted and easier to read. Example: library(xtable) ## Load example dataset data(tli) print(tli.table) gives \begin{table}[ht] \...
1
vote
2answers
1k views

How to avoid page break after table?

I have a small LaTeX table (tabular) created in R with the xtable package and I would like to place a figure underneath the table on the SAME page. I have tried various things (using packages float, ...
0
votes
1answer
470 views

Default low row height of table and tabular environments [duplicate]

Suppose that we have this code: \begin{table} \caption{xxxx.} \centering \begin{tabular}{|c|c|} \hline \rowcolor{Gray} % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ... 1 & ...
0
votes
1answer
127 views

xtable: extend table to both columns

Using the xtable package, is it possible to give some option to xtable function to generate a tex file which will contain following: ``` \begin{table*} ... \end{table*} ```
2
votes
1answer
823 views

Longtable exceeds page length

Situation: I am using rmarkdown and xtable to iterate the creation of several tables, and output them in Latex to create a PDF. Given that most tables are long, Im using Longtable package. Also, i ...
3
votes
1answer
248 views

Are conditional footnotes possible?

We are looking to create production Latex tables using xtable in R. Each table will have different footnotes based on certain data in the table. For example, in the below table instead of ...
1
vote
0answers
370 views

Extra Curly Braces when creating Xtable using Knitr, after specifiying size

I'm creating a R Markdown document using knitr and am running into trouble using xtable to create a table. My table is very large and I'm trying to reduce the size using the size command in the print ...
2
votes
1answer
583 views

“Missing $ inserted” error; when results='asis'

I have a problem in LyX when I want to export a PDF file using knitr. My chunk is as follows: <<echo=FALSE>>= read_chunk('resumen_3.R') @ <<3_0,echo=FALSE,results='asis'>>= ...
2
votes
1answer
2k views

Wrap text from xtable row names with knitr

I am using knitr to generate pdfs that contain tables that I'm making with xtable. How can I wrap the text in these tables? Here is my best effort so far: \documentclass{article} \begin{document} &...
0
votes
0answers
471 views

Specify horizontal position of xtable output in LaTeX

I originally posted about this on StackOverflow (https://stackoverflow.com/questions/31359737/table-environment-from-xtable), but it was recommended for me to post it here instead. I am using the ...
4
votes
2answers
562 views

Why my table does not center?

For some reasons my table does not center which is odd since I am doing exactly the same with another table in the same tex file and it works. Could someone help me? \documentclass[ 10pt, a4paper, ...
2
votes
1answer
291 views

knitr render html code

How to render html output to pdf in knitr? Here is my code \documentclass{article} \begin{document} <<echo=TRUE, results= 'asis'>>= library(xtable) n <- data.frame(x = 1:6, y = 15:20) ...
3
votes
1answer
4k views

Creating Bold Column Headers using xtable (knitr)

what is the easiest way to bold all column headers using the output of calling xtable, ideally under the print.xtable command. I am using knitr.
2
votes
1answer
3k views

RStudio problem with xtable “results=tex”… “object tex not found”

I am using the 'compile pdf' button in a .Rnw file in Rstudio, including the following: <<longterm1, results=tex, echo=FALSE>>= print(xtable(longterm), include.rownames=FALSE, floating=...
2
votes
1answer
4k views

How to print a table and figure side-by-side in knitr

I see a lot of posts on putting figures side by side with tables without knitr, and posts about putting tables next to tables and figures next to figures in knitr, but nothing on how to put a figure ...
4
votes
1answer
765 views

row and column specifications in xtable output

Using xtable I am trying to format a table x<- 1:5 y<- 11:15 mytable <- table(x,y) print(xtable(mytable)) Which gives: I want to add x and y tags also at the top of the rows and sides ...
7
votes
3answers
1k views

knitr sanitises the % marker for LaTex comments and they show up in the final document

I am writing a knitr document using xtable to get my tables. Xtable inserts by default a comment saying: "latex table generated in R 3.1.0 by stable 1.7-3 package % Thu Sep 18 14:19:21 2014" This ...
8
votes
1answer
4k views

Cross-referencing tables generated by xtable

I'd like to cross-reference a table that I generated with xtable in R. I cannot able to. Here is what I did: \documentclass{article} \begin{document} Look at \ref{tab:mytable}. <<echo=FALSE,...
0
votes
1answer
4k views

Xtable and Sweave

My question is regarding xtable and sweave. I have a certain table created in RStudio and want to create a pdf file using it. I use the package Sweave and write the necessary code and I get the table....
2
votes
2answers
452 views

First row in second table created is blacked out

I am a LATEX/R/Sweave newbie and am encountering an issue while creating a report. The issue is that as shown in the figure below the first heading in the second table is blacked out. I am able to ...
1
vote
0answers
930 views

How do I add a caption to a table within a minipage?

I am using Knitr to generate two tables side by side on a two column layout (ACM sigproc). \begin{table*} \begin{minipage}[h]{0.49\linewidth} <<results='asis'>>= print(xtable(o.stats.sel....
3
votes
1answer
2k views

Problem with hline on alternating row colour table

I've created a table where the rows alternate in colour however /hline is acting unusually. The first and second /hline work normally however after this alternating /hlines only show as a small dash ...
5
votes
1answer
620 views

noalign and \include

I have reduced my code to the following lines: \documentclass[9pt,letterpaper,oneside]{amsart} \usepackage{graphicx} \usepackage[table, dvipsnames]{xcolor} \usepackage{longtable} \usepackage[top=0....
4
votes
2answers
2k views

Result from summary in xtable [closed]

I have a vector of values, and I want to use the output of "summary" in LaTeX. I understand that xtable is designed for exactly that purpose. However ... > values <- c(1,2,3) > summary(...
5
votes
1answer
1k views

Dynamically format labels/columns of a LaTeX table generated in R/knitr/xtable

I have some tables coming from the statistical package R that I want to export in LaTeX markup. I would like to make every column large as the longest word of its label (assuming for simplicity the ...
5
votes
0answers
2k views

Color first row in a xtable generated table [closed]

I am trying to color the FIRST row of my table. But if I add \rowcolor[gray]{0.95} to the FIRST row the colored row will be the SECOND. Indeed it is quite straight forward to modify from the second ...
3
votes
1answer
1k views

Misplaced \noalign error in table, but only when using include{}

I am using xtable() in R to create a LaTeX table that I import into a .rnw file via \input{}. As documented here, I am attempting to highlight rows conditional upon a certain value of one variable. ...