similar to: xtable formatting: RED for negative numbers?

Displaying 20 results from an estimated 4000 matches similar to: "xtable formatting: RED for negative numbers?"

2009 Jul 29
1
xtable formatting: RED for negative numbers?
I've been experimenting recently with the fantastic Sweave/xtable combination for generating latex. In the xtable vignette, I found this great example of printing a ts object by months. Is there a way to modify this code to generate RED numbers inside xtable for negative results in x.ts? Thanks in advance. - Ken # Sweave/xtable snippet below
2009 Sep 27
2
xtable - how to add a "sum of values in a row" column?
Hi, I saw this example for 2.10 Time series in the xtable gallery documentation. http://cran.r-project.org/web/packages/xtable/vignettes/xtableGallery.pdf How would I add a column at the end "Total" which sums the row, with minimal changes to the code below? Thanks in advance. - Ken 2.10 Time series > temp.ts <- ts(cumsum(1 + round(rnorm(100), 0)), start = c(1954, + 7),
2004 Jul 15
1
formatting tables with long column names via package:xtable within Sweave
Hi, I use the excellent Sweave tools for writing documents but was wondering how to neatly print a data.frame with long column headings. I cant manage to do this via package:xtable. Typically the labels that I would like use for each column consist of more than one word, but even with just one word, the heading is often wider than the contents of the column. So the number of columns that fits
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){
2009 May 26
2
Using package "exams" and xtable
Hello, I am trying to use the package "exams" to construct problem sets. I have constructed an exercise which generates a list of integers and asks the student to compute the median. rx is the vector of n numbers >str(rx) num [1:16] 21 9 8 18 4 12 17 2 9 7 ... I want to print out the entire vector as part of the problem. When I use \Sexpr(rx) only the first value (in this case
2005 Aug 30
2
xtable
I have installed package xtable with su -c 'R CMD INSTALL xtable' and got this promising feedback: * Installing *source* package 'xtable' ... ** R ** data ** help >>> Building/Updating help pages for package 'xtable' Formats: text html latex example * DONE (xtable) Despite that, R returns: Error: couldn't find function "print.xtable"
2013 Feb 17
1
xtable nlme
Hola a todos Les consulto por un problema con xtable y nlme, tomando un ejemplo del manual de nlme para obtener los resultados en latex utilizando xtable, se puede utilizar el siguiente código, pero hay un problema y causa error. library(nlme) library(xtable) fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc), data = Loblolly, fixed = Asym + R0 + lrc ~ 1,
2007 Aug 09
1
Need Help: Installing/Using xtable package
Hi all, Let me know if I need to ask this question of the bioconductor group. I used the bioconductor utility to install this package and also the CRAN package.install function. My computer crashed a week ago. Today I reinstalled all my bioconductor/R packages. One of my scripts is giving me the following error: in my script I set: library("xtable") print.xtable(.... and receive this
2004 Jan 08
2
Sweave & xtable
I am just starting to learn Sweave (really neat tool). I am pretty early in the learning curve (I had to think a moment ago whether a # or % was the appropriate comment character). I have successfully incorporated simple graphics and outputs, but am having trouble getting a latex (xtable) table to function properly. Latex is seemingly treating the xtable code as input or verbatim text. That
2010 Jul 21
1
xtable with ifelse statement
Hi there, I'm very new on R and I hope someone can help me to solve the problem in using the ifelse statement with the xtable function(library xtable). I'm trying to get the printing of the elements of two lists in a sorted way. These two list have in common the their names. I will try to give an example: the first list looks like this: $code1 Code code1 Nation
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
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 Aug 22
1
Problem with xtable
Dear all, I am having trouble creating LaTex tables using the xtable command. I am using the bayesm package to analyse data. However, I am unable to generate LaTex tables converting the output from summary(out$deltadraws.) I have made several attempts using xtable but have been unsuccessful and receive the below error message. Does anyone have any ideas on how I can solve this problem or an
2009 Jun 12
1
xtable for plm objects
Hello, I am trying to use Sweave to write up a report, and I have used the plm package to do some panel models. I am trying to use xtable to make a nice table for my regression objects (returned by the plm command), but I am getting the error: Error in UseMethod("xtable") : no applicable method for "xtable" It seems like I would want to have xtable treat plm objects exactly
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 &
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 &
2012 Feb 07
1
xtable "beta" testing wanted
Dear R-users, I've enhanced the "xtable" package, adding numerous features that have been requested by users. The changes are listed below. The objective throughout has been to avoid any breaking changes. However, as "xtable" is widely used and is a dependency of many packages I'd like to have others try it out before I post it to CRAN. Both bug reports and design
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
2002 Dec 20
3
Sweave & xtable
I'm trying to get Sweave running for automatic report generation, and it seems to run fine when just using verbatim output. However, I've ran into a problem with xtable. I would like to print the following matrix using xtable: > dim(counts) [1] 19 15 All columns are filled with real/integer numbers > 0 and < 1000. Just typing xtable(counts) gives correct LaTeX output, but
2011 Sep 28
1
Printing an xtable with type = html
I have been playing around with producing tables using xtable and the type = "html" argument when printing. For example, if xtbl is the output of a dataframe which has been run through xtable, using the command: print(xtbl, type = "html", html.table.attributes = "border = '1', align = 'center'") I would be interested to see other examples of