Displaying 20 results from an estimated 5000 matches similar to: "Formatting digits in a table with mix of numbers and characters"
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)
2009 Jul 29
2
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
2011 Feb 02
1
set digits in xtable by row
Hello R-listers,
I am using xtable to create some LaTeX tables for me to Sweave into my
document. I am now trying to set the number of digits that will be
reported in several _rows_ in my table.
The 'digits' option in xtable() sets the number of digits to display for
specified columns. Am I missing another obvious option to do the same
thing for rows? A quick RSiteSearch didn't turn
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
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
2015 Jul 07
1
[ on call
I'm rather puzzled by this behavior:
e
export("caption<-", "caption", "label", "label<-", "align<-",
"align", "digits<-", "digits", "display<-", "display", "xtable",
"print.xtable", "toLatex.xtable")
> e[[1L]]
e[[1L]]
export
>
2013 Jul 15
2
tablas de R a latex
Hola:
El 15/07/13 09:41, José Luis Cañadas Reche escribió:
> Hola. Yo suelo utilizar knitr, con sweave creo qeu había que utilizar
> print(objeto xtable)
>
> De esta forma, utilizando xtable
>
>
> library(xtable)
> tabla.xtable <- xtable ( tutabla)
> print(tabla.xtable)
No es necesario utilizar print, con xtable(tutabla) basta.
Las excepciones son cuando hay que
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"
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
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
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
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
2012 Apr 03
3
Sweave xtable
Hola
Tengo un problema con Sweave y xtable, concretamente quiero cambiar el color según un criterio, creo que es más fácil explicar con los siguientes ejemplos, uno puede correr directamente porque es R, al siguiente código hay que guardarlo como Rnw, y luego puede ser corrido en R, donde seguramente al correr este se darán cuenta de mis dos problemas porque saltan al abrir el pdf que se obtiene
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
2007 Sep 13
1
chartr better
For example, the following changes are necessary when i convert a
Japanese hiragana into katakana in chattr.
R code:
> chartr("\u3041-\u3093","\u30a1-\u30f3","\u3084\u3063\u305f\u30fc")
--- R-alpha.orig/src/main/character.c 2007-09-05 07:13:27.000000000 +0900
+++ R-alpha/src/main/character.c 2007-09-13 16:10:21.000000000 +0900
@@ -2041,6 +2041,16 @@