Displaying 20 results from an estimated 700 matches similar to: "latex styling for R regression outputs"
2007 Mar 03
1
function doesnt return/create object
hello,
i have written a function to extract certain lines from a matrix. the
result is a matrix with 6 cols, named dynamically according to the
functions arguments.
the problem is now, that i'm not able to return the resultmatrix for
further use. the object is not being created.
example from my console:
getans(27,27)
[...]
[189,] 3969 161 27 1 0 1
[190,] 2142 87 27
2009 Nov 24
6
From R to LaTeX to pdf?
Hi all,
Anyone experienced in the LaTeX format?
I'm trying to use the xtable package to create nice anova tables, but how do I do to produce a pdf from the resulting LaTeX table? I've tried WinShell and MiKTeX, but I couldn't get any of them working...
Here's an example of the output in R:
% latex table generated in R 2.9.2 by xtable 1.5-6 package
% Tue Nov 24
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]")
2012 Oct 10
6
Exporting summary plm results to latex
Dear all,
I am trying to export my fixed effect results to Latex. I am using the plm package with the summary function. However, it does not look like apsrtable, stargazer, or any other package can accompany using the plm package.
I am interested in a classic table with the coefficient in one row followed by the standard error in paranthesis in the next row and stars by the coefficient to show
2008 Mar 28
1
Sweave - print \n ?
Hi,
this is probably quite stupid but I have no clue
what's wrong. Let's say I write the function
hline <- function() {
cat("\\hline \n")
}
and call hline() from within a Sweave chunk. Why is
there no carriage return after the \hline in the
resulting tex file?
if I call hline() hline() in the chunk, then I get
\hline \hline
in the tex code without a linebreak in
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
2008 Mar 11
2
R-Latex question
Hi, maybe my question is not typical. I want to make R table-kind output to
be readable immediately in Latex but I am struggling with symbol '\' needed
for instance in '\hline'. For example when 'Table' is a matrix class object:
cat("&",Table[1,1], "&",Table[1,2], "\n");flush.console()
cat("\hline \n");flush.console()
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
2013 Mar 15
2
latex(test, collabel=) returns wrong latex code?
Hello:
I'm working with a 2-dimensional table that looks sort of like test below.
I'm trying to produce latex code that will add dimension names for both the rows and the columns.
In using the following code, latex chokes when I include collabel='Vote' but it's fine without it.
The code below prouces the latex code further below. I'm confused by this, because it looks
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
2015 Nov 16
2
stargazer
Estimados
Cuando quiero hacer una tabla con el paquete stargazer, esto es lo que me
sale, probablemente tengo que instalar algun programa
sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)
locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
[3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
[5]
2006 May 03
2
Outreg-like command?
It would be nice to have something like stata's outreg that lets regression
output go into a form like
Specification (1) Specification (2)
Var 1 coef(1,1) coef(1,2)
se(1,1) se(1,2)
Var 2 coef(2,1) coef(2,2)
se(2,1) se(2,2)
I don't think this can be done in xtable?
Thomas Davidoff
Assistant Professor
Haas School of Business
UC Berkeley
Berkeley, CA 94618
Phone: (510)
2015 Nov 25
2
stargazer
Estimados
Instale MiKTeX 2,9 y Texmaker y se mantiene el problema. ApreciarÃa la
ayuda de los conocedores
Saludos
Cuando quiero hacer una tabla con el paquete stargazer, esto es lo que sale
stargazer(attitude)
% Table created by stargazer v.5.2 by Marek Hlavac, Harvard University.
E-mail: hlavac at fas.harvard.edu
% Date and time: lu., nov. 16, 2015 - 10:55:58 \begin{table}[!htbp]
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
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 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
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 &
1999 Mar 20
1
How to get '\h' through print() or paste()?
Hello,
[really hoping not to ask something the 1001th time]
I need single backslashes printed for generating TeX-code.
That works:
> print("\begin{tabular}")
[1] "\begin{tabular}"
But \h seems to be interprated in some way:
> print('\hline')
[1] "hline"
Hm, trying to mask the backslash:
> print('\\hline')
[1]
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){