search for: hline

Displaying 20 results from an estimated 124 matches for "hline".

Did you mean: line
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 between. Thanks fo...
2011 Oct 28
1
xtable with \begin{tabular} and only.contents
...t;- rep(0, 7) addtorow <- list() addtorow$pos <- list() addtorow$pos[[1]] <- c(0, 2) addtorow$pos[[2]] <- 4 addtorow$command <- c('\vspace{2mm} \n', '\vspace{10mm} \n') print(xres, add.to.row=addtorow, include.rownames=FALSE, include.colnames=TRUE, only.contents=TRUE, hline.after=c(0, 0, 9, 9)) Output (only.contents=TRUE) % latex table generated in R 2.13.2 by xtable 1.6-0 package % Fri Oct 28 11:38:10 2011 1 & 2 & 3 & 4 & 5 & 6 \\ space{2mm} \hline \hline 1 & 7 & 6 & 6 & 5 & 9 \\ 1 & 1 & 1 & 5 & 7 & 7...
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
2013 Apr 25
0
tables: proper use of Hline() in tabular()
Dear all, I am unable to understand how Hline() works in tabular(). I've read the vignette and the help page, and here this example compiles perfectly fine: latex( tabular( Species + Hline() + 1 ~ Heading()*mean*All(iris), data=iris) ) However, if I try it on my own data it fails. Consider this: set.seed(1) Xa <- data.f...
2015 Nov 25
2
stargazer
...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] \centering \caption{} \label{} \begin{tabular}{@{\extracolsep{5pt}}lccccc} \\[-1.8ex]\hline \hline \\[-1.8ex] Statistic & \multicolumn{1}{c}{N} & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} \\ \hline \\[-1.8ex] rating & 30 & 64.633 & 12.173 & 40 & 85 \\ complaints & 30 &...
2007 Jun 20
2
"xtable" results doesn't correspond to data.frame
..."," ","number of patients","%") example.xtable <- xtable(example.table) print.xtable(example.xtable, include.rownames=FALSE) I can seem to get latex output which corresponds to the data.frame which is, \begin{table}[ht] \begin{center} \begin{tabular}{llll} \hline & & number of patients & \% \\ \hline Gender & & & \\ & Male & 3 & 0.428571428571429 \\ & Female & 4 & 0.571428571428571 \\ \hline \end{tabular} \end{center} \end{table}
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() cat("&",Table[2,1], "&",Table[2,2], "\n");flush.console...
2010 Nov 22
1
Problem setting the number of digits in xtable
...- xtable(tmp) > > digits(xtmp) <- c(0,0,3,4) > > print(xtmp, include.rownames = FALSE) # row names produced : > % latex table generated in R 2.12.0 by xtable 1.5-6 package > % Mon Nov 22 17:35:00 2010 > \begin{table}[ht] > \begin{center} > \begin{tabular}{rrr} > \hline > 1 & 2 & 3 \\ > \hline > -2 & -2.158 & 2.8886 \\ > 1 & 1.330 & 0.4677 \\ > -0 & 0.486 & -0.3319 \\ > \hline > \end{tabular} > \end{center} > \end{table} But this won't work : > > mydata > TEST...
2008 Sep 24
1
paste in xtable
...trix(1:4, nrow=2,ncol=2) > test = xtable(test) > test[,1] = ifelse(test[,1]>1,paste('\textbf{',test[,1],'}'),test[,1]) > test % latex table generated in R 2.5.1 by xtable 1.5-1 package % Tue Sep 23 17:08:18 2008 \begin{table}[ht] \begin{center} \begin{tabular}{rrr} \hline & 1 & 2 \\ \hline 1 & 1 & 3 \\ 2 & extbf\{ 2 \} & 4 \\ \hline \end{tabular} \end{center} \end{table} example 2: > test= matrix(1:4, nrow=2,ncol=2) > test = xtable(test) > test[,1] = ifelse(test[,1]>1,paste('\\textbf{',test[,1],'}...
2013 Mar 15
2
latex(test, collabel=) returns wrong latex code?
...misc) test<-as.table(matrix(c(50,50,50,50), ncol=2)) latex(test, rowlabel='Gender',collabel='Vote', file='') % latex.default(test, rowlabel = "Gender", collabel = "vote", file = "") % \begin{table}[!tbp] \begin{center} \begin{tabular}{lrr} \hline\hline \multicolumn{1}{l}{Gender}&\multicolumn{1}{vote}{A}&\multicolumn{1}{l}{B}\tabularnewline \hline A&$50$&$50$\tabularnewline B&$50$&$50$\tabularnewline \hline \end{tabular} \end{center} \end{table} ********************************* Simon J. Kiss, PhD Assistant Professor,...
2015 Nov 16
2
stargazer
..._3.2.2 > 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] \centering \caption{} \label{} \begin{tabular}{@{\extracolsep{5pt}}lccccc} \\[-1.8ex]\hline \hline \\[-1.8ex] Statistic & \multicolumn{1}{c}{N} & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} \\ \hline \\[-1.8ex] rating & 30 & 64.633 & 12.173 & 40 & 85 \\ complaints & 30 & 66.600...
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] "\\hline" But I need "\hline"... Is there a way without generating strange code in a temporary file for "sed"ing it? It would be also nice to get rid of the lead...
2009 Nov 24
6
From R to LaTeX to pdf?
...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 14:17:32 2009 \begin{tabular}{lrrrrr} \hline & Df & Sum Sq & Mean Sq & F value & Pr($>$F) \\ \hline cat & 2 & 40.50 & 20.25 & 6.66 & 0.0019 \\ Residuals & 107 & 325.13 & 3.04 & & \\ \hline \end{tabular} Best regards, Joel _________________________...
2012 Feb 01
2
Problem with xtable- rescaling a table
...age[counterclockwise]{rotating} \usepackage{graphics} \usepackage{float} \pagestyle{empty} \begin{document} \scalebox{0.70} { %resize % latex table generated in R 2.13.1 by xtable 1.6-0 package % Tue Jan 31 23:26:10 2012 \begin{sidewaystable}[ht] \begin{center} \begin{tabular}{ccc} \hline & V1 & V2 \\ \hline & & \\ 6.91 & 500.00 & 4.00 \\ 400.00 & & 400.00 \\ \hline \end{tabular} \caption{Title} \end{center} \end{sidewaystable} } \end{document} Thanks a lot for any advice. Best, Aurelien [[alternative HTML version d...
2009 Jan 26
1
Sweave'ing Danish characters
...ontains a diagnosis with Danish characters ("Kr?ft i ford?jelsessystemet", meaning gastrointestinal cancer). > > print(xtable(table(test2))) % latex table generated in R 2.8.1 by xtable 1.5-4 package % Mon Jan 26 23:31:37 2009 \begin{table}[ht] \begin{center} \begin{tabular}{rr} \hline & test2 \\ \hline Kr?ft i ford?jelsessystemet & 1 \\ # It looks right here, but in the .tex-file it says "Kr??ft i ford??jelsessystemet" \hline \end{tabular} \end{center} \end{table} > print(xtable(table("Kr?ft i ford?jelsessystemet"))) # This, on the other h...
2011 Aug 17
1
Symbol Font Baseline, Cairo, Card Symbols
...es <- expression(symbol('\252')) csymbols <- c(clubs, diamonds, hearts, spades) CairoPDF(file = "cardsymbols.pdf") plot( 0, xlim=c(0,5), ylim=c(0,2), type="n" ) clr <- c("black", "red", "red", "black") for (i in 1:4) { hline <- function( yloc, ... ) for (i in 1:length(yloc)) lines( c(-1,6), c(yloc[i],yloc[i]), col="gray") hline(0.9); hline(1.0); hline(1.1); hline(1.2) text( i, 1, csymbols[i], col=clr[i], cex=5 ) text( i, 0.5, csymbols[i], col=clr[i] ) } dev.off() ---- Ivo Welch (ivo.welch at...
2013 May 24
2
xtable() with booktabs option problem
...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 & 14 \\ e & 10 \\ f & 12 \\ g & 10 \\ h & 6 \\ i & 9 \\ \hline \end{tabular} \end{table} What stunningly stupid thing am I doing? John Kane Kingston ON Canada _______...
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)
2011 Jun 01
1
xtable with conditional formatting using \textcolor
...e.string <- col(da$score) require(xtable) xtable(da[,c("id","score.string")]) #----------------------------------------------------------------------------- actual result #----------------------------------------------------------------------------- \begin{tabular}{rll} \hline & id & score.string \\ \hline 1 & a & extcolor\{red\}\{ 2.00 \} \\ 2 & b & extcolor\{red\}\{ 4.00 \} \\ 3 & c & extcolor\{red\}\{ 6.00 \} \\ 4 & d & extcolor\{blue\}\{ 8.00 \} \\ 5 & e & extcolor\{blue\}\{ 10.00 \} \\...
2008 Dec 03
0
Hmisc latex() and Rcmdr numSummary() percentage issues
...g the percentage signs `\%'. Would there be a way to automatise this? Thank you, Liviu ######## Uncompilable LaTeX ######## % latex.default(as.table(.numSummary$table), cdec = c(2), file = "", title = "") % \begin{table}[!tbp] \begin{center} \begin{tabular}{lrrrrrrr}\hline\hline \multicolumn{1}{l}{}& \multicolumn{1}{c}{mean}& \multicolumn{1}{c}{sd}& \multicolumn{1}{c}{0%}& \multicolumn{1}{c}{25%}& \multicolumn{1}{c}{50%}& \multicolumn{1}{c}{75%}& \multicolumn{1}{c}{100%} \\ \hline &$31.37$&$20.41$&$10.6$&$16.9$&$23.7$&a...