Displaying 20 results from an estimated 1000 matches similar to: "getting names of dimnames of xtabs into xtable latex output"
2007 Jun 20
2
"xtable" results doesn't correspond to data.frame
Dear useRs,
Am trying to use xtable on the following data.frame and I don't get what I
expect:
example.table <- data.frame(rbind(
c("Gender"," "," "," "),
cbind(rep(" ",2),c("Male","Female"),c(3.0,4.0),c(3/7,4/7))
))
colnames(example.table) <- c(" "," ","number of
2011 Oct 28
1
xtable with \begin{tabular} and only.contents
I have found that I like having my captions and labels in my latex document
rather than having them contained in my xtable output file (I haven't fully
gone to sweave yet). I know I can do something like this by using the
'only.contents' argument in xtable. Unfortunately, the only.contents
argument also removes the \begin{tabular}{rrrrrr} & \end{tabular} (in the
example below) of
2013 May 24
2
xtable() with booktabs option problem
I could have sworn that yesterday xtable(file, booktabs = TRUE) was giving me toprule , midrule and bottomrule outout. Today :
library(xtable)
aa <- table( sample(letters[1:9], 100, replace = TRUE))
xtable(aa,
booktabs = TRUE)
gives me
\begin{table}[ht]
\centering
\begin{tabular}{rr}
\hline
& V1 \\
\hline
a & 15 \\
b & 11 \\
c & 13 \\
d &
2008 Sep 24
1
paste in xtable
Dear R help:
I am trying to use paste(), within an ifelse() statement to insert latex
commands into an object that has been created using xtable(). I cannot
make the strings behave as I would like, the '\t' is creating a tab, the
usual method of '\\t' is not working either - nor is any series of
backslashes. The xtable object, I think, automatically alters the
strings. How
2010 Nov 22
1
Problem setting the number of digits in xtable
DEar list members,
I am currently using Sweave with LaTeX which is great.
I can use xtable for formatting outp of tables but I have a problem setting the number of decimals in xtables when used with dataframe.
I have found an example on the net ith matrix and it works.
For example this works :
> > tmp <- matrix(rnorm(9), 3, 3)
> > xtmp <- xtable(tmp)
> > digits(xtmp)
2008 Jul 03
1
*** significance with xtable
Hello everybody,
i used xtable to get some latex output, which worked pretty well with
my latex document. But somewhere i missed the part where they explain
how to get these nice significance indicating *** into my latex
table. it just stops right after Pr(> |t|)
thanks in advance
matthias
2011 Jun 01
1
xtable with conditional formatting using \textcolor
Hello list,
I'm doing a table with scores and I want include colors to represent status
of an individual. I'm using sweave <<results=tex>>= and xtable but I can't
get a result I want. My attemps are
#-----------------------------------------------------------------------------
# code R
da <- data.frame(id=letters[1:5], score=1:5*2)
col <- function(x){
2007 Dec 05
1
alternatives to latex() or xtable() ?
Hello everyone,
I have several problems with exporting to LaTeX the output of
numSummary() from the abind package.
> numSummary(finance[,"Cash_flow"], statistics=c("mean", "sd", "quantiles"))
mean sd 0% 25% 50% 75% 100% n NA
188070.9 414771.9 -426804 26743 53866 150975.5 1871500 54 4
>
2012 Feb 01
2
Problem with xtable- rescaling a table
Dear R users,
I am new to Latex and I am using the R package xtable to generate tables.
I want to produce a table that is very long. in the landscape format, but
I would need to rescale the table so that it fits in the page. xtable
enables me to have the landscape format, but I cannot rescale it, and there
seems to be a problem, if I use scalebox in Latex on my output produced
with stable and the
2010 Mar 13
2
Un poco de ayuda con xtable
Hola, buenas tardes:
Necesitaba un poco de socorro con xtable, si fuese posible.
Mi problema es que quiero 'formatear' específicamente algunas celdas de
una tabla generada con xtable y no soy capaz.
Detallo el problema de ejemplo:
vv<-rbind(c(1,1,0,1),c(0,0,1,1))
vv[2,3]<-<-paste("\\textbf{",vv[2,3],"}",sep="")
xtable(vv)
> xtable(vv)
% latex
2013 Sep 13
2
xtable use plus minus
I am using a similar dataset to the following:
a= c("Fruits", "Adam","errorA", "steve", "errorS",
"apples", 17.1,2.22, 3.2,1.1,
"oranges", 3.1,2.55, 18.1,3.2 )
a_table=data.matrix(t(matrix(a,nrow=5)))
I would like to plus minus every second column starting from errorA (using
xtable/ hmisc)
example output (ignoring
2007 Sep 13
1
Problem using xtable on an array
Hi all
I know about producing a minimal example to show my problem. But I'm
having trouble producing a minimal example that displays this
behaviour, so please bear with me to begin with.
Observe: I create an array called model.mat. Some details on this:
> str(model.mat)
num [1:18, 1:4] -0.170 -0.304 -2.617 2.025 -1.610 ...
- attr(*, "dimnames")=List of 2
..$ : chr
2004 May 13
2
xtable without rownames
When I tried to read all the entries (after searching the FAQ) for "row
names xtable", I get
START-INFO-DIR-ENTRY * R FAQ: (R-FAQ). The R statistical system ...
... xtable* Export data to LaTeX and HTML tables. ... For dropping the row
names of a matrix
`x', it may be easier to use `rownames(x) <- NULL', similarly for column ...
2004 Aug 28
1
Handling of special characters by xtable
It seems that xtable does not escape special characters such as % (which indicates a comment line in LaTeX).
Try these few lines for example:
> library(xtable)
> q<-data.frame(quantile(rnorm(100)))
> xtable(q)
This produces:
% latex table generated in R 1.9.1 by xtable 1.2-3 package
% Sat Aug 28 16:11:05 2004
\begin{table}[ht]
\begin{center}
\begin{tabular}{rr}
\hline
&
2010 Jul 02
1
help with the xtable package
HI, Dear R community,
I am using the xtable to create the table, but how can I see the table?
The following is the codes I used:
> data(tli)
> tli.table <- xtable(tli[1:10, ])
> digits(tli.table)[c(2, 6)] <- 0
> print(tli.table, floating = FALSE)
% latex table generated in R 2.11.0 by xtable 1.5-6 package
% Thu Jul 1 20:43:43 2010
\begin{tabular}{rrlllr}
\hline
&
2009 Dec 09
1
Exporting Contingency Tables with xtable
Dear R-philes:
I am having an issue with exporting contingency tables with xtable().
I set up a contingency and convert it to a matrix for passing to
xtable() as shown below.
v.cont.table <- table(v_lda$class, grps,
dnn=c("predicted", "observed"))
v.cont.mat <- as.matrix(v.cont.table)
Both produce output as follows:
observed
predicted uh uh~
uh 201
2010 Oct 21
2
Adding rows to column
I'm new to R.
I'm extracting important columns from single table using following code:
File2<-"file.txt"
table2<- read.delim(File2, skip=19, sep=";", header=F, na.strings=NA,
fill=T)
#extracting column 7 where rows match "ID"
col1<- table2[grep("ID", table2[,1]),7]
#similarly extracting column 9,11,13,15
col2<-
2008 May 07
1
Sweave, xtable and font size
Hi,
I'm using Sweave with xtable to generate Latex tables. My problem is that some of the tables are too wide, and I would like to use the tiny font for these tables, but not for the others nor for the text. I can't work out how to accomplish that.
The Latex code below does what I want it to, but I have to insert the "\tiny{" and the closing "}" by hand. It
2012 Mar 22
2
How to draw table in Latex without using xtable?
Hi,
I am working on table suing R and Latex. I am writing .Rnw file first in
which i m reading input file and storing into dataframe. After filtering
certain values from this dataframe. I am planning to display it. I don't
want to use xtable since i need to change column names.
*Sample .Rnw file*
@
<<echo=FALSE>>=
cat("\begin{table}[ht]")
2004 Jun 22
1
Using xtable with summaries of lm objects
Hi all
Suppose I do the following:
set.seed(1000)
library(xtable)
x <- runif( 10 )
y <- 1 + 2*x + rnorm( length(x) )
test.lm <- lm( y ~ x )
summary( test.lm )
xtable ( summary( test.lm ) )
The final xtable output follows:
% latex table generated in R 1.8.1 by xtable 1.2-2 package
% Tue Jun 22 09:56:36 2004
\begin{table}[ht]
\begin{center}
\begin{tabular}{rrrrr}
\hline
&