ring folks.
>
> Thank you kindly!
>
> Shawn Way, PE
>
> -Original Message-
> From: Jeff Newmiller
> Sent: Wednesday, July 18, 2018 9:26 PM
> To: Shawn Way
> Cc: r-help@r-project.org
> Subject: Re: [R] xtable does not print out units of a variable
>
&
us engineering folks.
Thank you kindly!
Shawn Way, PE
-Original Message-
From: Jeff Newmiller
Sent: Wednesday, July 18, 2018 9:26 PM
To: Shawn Way
Cc: r-help@r-project.org
Subject: Re: [R] xtable does not print out units of a variable
On Wed, 18 Jul 2018, Shawn Way wrote:
> I have
automatic conversion
between units, something necessary for us engineering folks.
Thank you kindly!
Shawn Way, PE
-Original Message-
From: Jeff Newmiller
Sent: Wednesday, July 18, 2018 9:26 PM
To: Shawn Way
Cc: r-help@r-project.org
Subject: Re: [R] xtable does not print out units of
On Wed, 18 Jul 2018, Shawn Way wrote:
I have a dataframe that contains units using the units package.
Unfortunately, I really need the units for reporting. I'm assuming
that's because the data is in a class units and xtable doesn't know what
to do with this.
If you want a bug or feature in
John:
Sorry, but I do not understand what you have done.
It seems like you hard coded the format I want, correct?
Bruce
John Kane wrote:
Hi Bruce,
We don't need all that code :) All that is required is the data.fame
being used in the xtable command and the actual xtable commands. Below
is
John:
Did not mean to take a short-cut, but I thought the code was not needed.
Your follow-up is appreciated. Here's the code. I want the column headings
to wrap around into two lines, not one long heading.
Any help is greatly sought. Thanks. Bruce
~~
Response <- rbinom(50,1,0.2)
yhat <- run
Can you give us an example. I am having a problem visualizing this. It seems
obvious just to put in a line break normally but in xtabs who knows?
On Monday, May 15, 2017 1:15 PM, Bruce Ratner PhD wrote:
R-help:
I'm using xtable that produces a table in html with one-line for each of t
John:
Here is the code of my xtable:
TABLE <-xtable(dec_analy, digits = c(0,0,0,0,2,2,0),
align = "ccc", latex.environments = "center",
caption = "Analysis ")
print.xtable(TABLE, type="html",file="C:/R_Data/Table.html",
include.rownames
John:
After I generate the xtable table, I manually edited (by inserting
) the html header, below.
Is there a way in xtable that I can set some setting to affect my xtable
table?
Thanks for your reply.
Bruce
Analysis
DECILE
NUMBER OF INDIVIDUALS
NUMBER OF RESPONDERS
RESPONSE RA
Does p{3cm} do what you want as an alignment?
On 02/03/2017 12:39, g.maub...@weinwolf.de wrote:
Hi All,
I have the following code in R Markdown document:
```{r, results = "asis", echo = FALSE}
library(xtable)
response <- as.data.frame(matrix(NA, 2, 2))
colnames(response) <- c("Anzahl", "Prozen
On 02/24/2015 05:16 AM, AURORA GONZALEZ VIDAL wrote:
I have a problem with the caption option on the xtable function.
Using Rmarkdown, knitr generates correctly a pdf when I write something
like this:
```{r xtable, results="asis"}
library( xtable )
variableName <- c( "V03_1" )
age <- c( rep(1,
Dear Aurora
I suspect the underscore character in your variable name is the problem.
On 24/02/2015 11:16, AURORA GONZALEZ VIDAL wrote:
Dear all,
I have a problem with the caption option on the xtable function.
Using Rmarkdown, knitr generates correctly a pdf when I write something
like this:
I can live with that. Thanks Ista!
--
Stergios Marinopoulos
- Original Message -
From: Ista Zahn
To: Stergios Marinopoulos
Cc: R. Project Help
Sent: Wednesday, July 30, 2014 2:50 PM
Subject: Re: [R] xtable problems with xts objects
Hi Stergios,
I think as.data.frame(x) solves
Hi Stergios,
I think as.data.frame(x) solves both your problems.
Best,
Ista
On Wed, Jul 30, 2014 at 5:22 PM, Stergios Marinopoulos
wrote:
> Hi, I'm having trouble getting xtable to print a simple xts object. When
> the frequency is 1800 I get an error. However when frequency(x) is reporte
Thanks so much, Rainer.
Your detailed example has taught me a lot of what I need to use xtable
more productively, in particular the options for the print() method.
-Michael
On 11/27/2013 12:20 PM, Rainer Schuermann wrote:
UPDATE:
Now including the LaTeX math formatting
saxtab <- t( as.data.fra
UPDATE:
Now including the LaTeX math formatting
saxtab <- t( as.data.frame( addmargins( Saxony ) ) )
rownames( saxtab ) <- c( "Males ($k$)", "Families ($n_k$)" )
saxtab <- xtable( saxtab, digits = 0,
caption = "Number of male children in 6115 Saxony families of size 12",
align = "l|r
You get the cation to the top of the table with
print( saxtab, caption.placement = "top" )
Formatting the table the way you want can be done like this - I did not manage
to carry the LaTeX math formatting for the row names over ($k$ and $n_k$)but
the rest should be very much what you want:
saxt
1 package
% Thu Sep 12 22:42:58 2013
\begin{table}[ht]
\centering
\begin{tabular}{rlll}
\hline
& Fruits & Adam & steve \\
\hline
1 & apples & 17.10$\pm$2.22 & 3.20$\pm$1.10 \\
2 & oranges & 3.10$\pm$2.55 & 18.10$\pm$3.20 \\
\hline
\end{tabular}
\end{ta
Here is a start
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)))
# restructure data
ahead = a_table[1,]
atab <- data.frame(a_table[-1,])
for (j in 2:5) atab[,j]=trunc(as.numeric(atab
dana
Cc: R help
Sent: Thursday, September 12, 2013 9:29 PM
Subject: Re: [R] xtable use plus minus
Hi,
Try:
a_table[grep("\\d+",a_table)]<- paste0(a_table[grep("\\d+",a_table)],"$\\pm$")
library(xtable)
print(xtable(a_table),sanitize.text.function=identity)
% la
Hi,
Try:
a_table[grep("\\d+",a_table)]<- paste0(a_table[grep("\\d+",a_table)],"$\\pm$")
library(xtable)
print(xtable(a_table),sanitize.text.function=identity)
% latex table generated in R 3.0.1 by xtable 1.7-1 package
% Thu Sep 12 21:26:45 2013
\begin{table}[ht]
\centering
\begin{tabular}{rl
i knew it was something stunningly stupid. Thanks a lot.
John Kane
Kingston ON Canada
> -Original Message-
> From: marc_schwa...@me.com
> Sent: Fri, 24 May 2013 14:41:52 -0500
> To: jrkrid...@inbox.com
> Subject: Re: [R] xtable() with booktabs option problem
>
>
On May 24, 2013, at 2:36 PM, John Kane wrote:
> 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 = TRU
On Dec 18, 2012, at 9:24 AM, Simon Kiss wrote:
> Hello:
> I s there a way to use xtable with objects from the psych package,
> particularly principal()?
> Is there a difference between princomp and principal? xtable seems to play
> better with princomp.
> Thank you.
> Yours, Simon Kiss
I have
Hi,
The "xtable" method for "summary.prcomp" is just creating a table of the
"importance" values. So you can get the same table for just a few of the PCs
by subscripting the importance values:
xtable(mySummary$importance[,1:2],digits=4)
Best,
Charlie
-Original Message-
From: r-he
Hi Charles,
This looks great, I'll try it out later today.
Any chance that more automated multicolumn headers will be added in a future
version? I know you can do it using the add.to.row argument, but it would be
great to have an automated way using something like cgroup and n.cgroup in
Hmisc:
It works if you separate the print command and put the caption placement in
the print command
, see below:
\documentclass[11pt,a4paper]{article}
\usepackage{Sweave}
\begin{document}
<<>>=
x = runif(100, 1, 10)
y = 2 + 3 * x + rnorm(100)
@
<>=
library(xtable)
p <- (xtable(summary(lm(
Dear Renger,
This is occurring because "xtable" divides up the arguments into items related
to the "content" of the table and arguments related to the "layout" of the
table.
The "caption.placement" is an argument to "print.xtable()" rather than to
"xtable()":
print(xtable(summary(lm(y~x)),
As suggested I switched over to sweave. Not to bore you with the details
but I have a lot of .tex tables that I have already created that I was
previously inserting into my tex document (using \input). The journal I
plan on submitting to eventually wants the final .tex file so I thought it
would
On 28/10/2011 2:40 PM, Trevor Davies wrote:
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).
The remark in the parens is the problem here. Use Sweave.
Duncan Murdoch
On 9/6/2011 4:01 AM, eldor ado wrote:
I have a related question:
dataframe df contains values like
df
.. "\\textbf{ 0.644 }" ..
and the line
print( xtable(df , sanitize.text.function = function(x){x}))
sanitize.text.function is an argument of print.xtable, not xtable. Try
print( xta
I have a related question:
dataframe df contains values like
>df
.. "\\textbf{ 0.644 }" ..
and the line
> print( xtable(df , sanitize.text.function = function(x){x}))
converts them to
.. & $\backslash$textbf\{ 0.644 \} & ..
escaping both double backslashes and brackes.
maybe somebody her
On Aug 10, 2011, at 2:02 PM, Zev Ross wrote:
> Hi,
>
> For some reason I'm finding that my table caption is disappearing if I print
> xtable output with the floating argument set to FALSE. Below is a very simple
> Sweave file that produces two tables the first has no caption and the second
> h
Marc,
Thank you very much. You gave exactly what I wanted.
Bests.
Walmes.
==
Walmes Marques Zeviani
LEG (Laboratório de Estatística e Geoinformação, 25.450418 S, 49.231759 W)
Departamento de Estatística - Universidade Federa
On Jun 1, 2011, at 1:33 PM, Walmes Zeviani wrote:
> Hello list,
>
> I'm doing a table with scores and I want include colors to represent status
> of an individual. I'm using sweave <>= and xtable but I can't
> get a result I want. My attemps are
>
> #-
not an xtable solution, but R2HTML::HTML has an impressive list of
methods, including HTML.infl:
lm.SR <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
influencia <- influence.measures(lm.SR)
library(R2HTML)
methods(HTML)
HTML(influencia, 'influencia.html')
and open the html file i
Or class(influencia) and then see it is in this vector:
> methods(xtable)
[1] xtable.anova* xtable.aov* xtable.aovlist*
[4] xtable.coxph* xtable.data.frame* xtable.glm*
[7] xtable.lm* xtable.matrix* xtable.prcomp*
[10] xtable.summary.a
Try
str(influencia)
I don't think xtable is intended to print lists.
--- On Wed, 7/21/10, Silvano wrote:
> From: Silvano
> Subject: [R] xtable
> To: r-help@r-project.org
> Received: Wednesday, July 21, 2010, 4:15 PM
> Hi,
>
> How do I build a table from a regression model adjusted
> using xta
What exactly do you want to do? To me it looks more like a problem with the
arrangement of your lists as with xtable (or ifelse) (so you are better next
time of with a more precise subject line).
Please read the posting guide and provide some reproducable code so we can help
you (and include yo
fair enough!
I was just hoping there was some free lunch...
thanks and best from Rotterdam,
Stefan
On Wed, Jun 23, 2010 at 4:26 PM, Hadley Wickham wrote:
>> If anybody has quick fix, that would be helpful.
>
> Write your own function that wraps xtable...
>
> Hadley
>
>
> --
> Assistant Professor
> If anybody has quick fix, that would be helpful.
Write your own function that wraps xtable...
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
__
R-help@r-project.org mailing
Hi Silvano,
Silvano wrote:
Hi,
I'm using Sweave to prepare a descriptive report.
Are at least 20 tables built with xtable command of kind:
<>=
q5 = factor(Q5, label=c("Não", "Sim"))
(q5.tab = cbind(table(q5)))
@
<>=
xtable(q5.tab, align="l|c", caption.placement = "top", table.placement='H')
@
On Jun 14, 2010, at 8:09 AM, Silvano wrote:
> Hi,
>
> I'm using Sweave to prepare a descriptive report.
> Are at least 20 tables built with xtable command of kind:
>
> <>=
> q5 = factor(Q5, label=c("Não", "Sim"))
> (q5.tab = cbind(table(q5)))
> @
>
> <>=
> xtable(q5.tab, align="l|c", caption.pl
Fantastic! I didn't know about addmargins()...
It looks like with FUN=myfunc, I can make it do all sorts of fun
calculations over the row.
TYVM
- Ken
Henrique Dallazuanna wrote:
>
> Try this:
>
> temp.table <- xtable(temp.ts, digits = 0)
> temp.table <- xtable(addmargins(as.matrix(as.dat
Try this:
temp.table <- xtable(temp.ts, digits = 0)
temp.table <- xtable(addmargins(as.matrix(as.data.frame(temp.table)),
2), digits = 0)
On Sun, Sep 27, 2009 at 2:24 PM, Ken-JP wrote:
>
> Hi,
>
> I saw this example for 2.10 Time series in the xtable gallery documentation.
>
> http://cran.r-pr
I wonder if the right approach is to convert temp.ts into a matrix, add the
column at the end, and then call xtable()... ...anyone have any
suggestions?
TIA.
- Ken
Ken-JP wrote:
>
> Hi,
>
> I saw this example for 2.10 Time series in the xtable gallery
> documentation.
>
> http://cran.r-p
On Sep 24, 2009, at 10:20 AM, Thomas Lumley wrote:
On Mon, 21 Sep 2009, David Winsemius wrote:
On Sep 21, 2009, at 5:52 PM, Martin Batholdy wrote:
I use xtable to convert data.frames to html tables.
But when I use the print-command I always get the whole output
printed
even if I just wan
On Mon, 21 Sep 2009, David Winsemius wrote:
On Sep 21, 2009, at 5:52 PM, Martin Batholdy wrote:
I use xtable to convert data.frames to html tables.
But when I use the print-command I always get the whole output printed
even if I just want to save the html table into a variable;
table <- prin
Note that R has a capture.output function, e.g.
s <- capture.output(print(xtable(BOD), type = "html"))
On Mon, Sep 21, 2009 at 9:21 PM, Charlie Sharpsteen
wrote:
> On Mon, Sep 21, 2009 at 3:52 PM, Don MacQueen wrote:
>
> snip...
>
>
>> In other words, there is no such thing as saving the html
On Mon, Sep 21, 2009 at 3:52 PM, Don MacQueen wrote:
snip...
> In other words, there is no such thing as saving the html table into a
> variable. It just doesn't work that way. All that is possible is to write it
> (print it) to either the screen or a file.
>
> Which leads back to the question
I think there is a conceptual issue here.
The xtable() function does not actually create html. What it does is
add some attributes to the dataframe that is given to it. Here's an
example:
tmp <- data.frame( a =1:3, b= c('a','b','c') )
foo <- xtable(tmp)
class(foo)
[1] "xtable" "da
On Sep 21, 2009, at 6:13 PM, Martin Batholdy wrote:
Am 21.09.2009 um 23:59 schrieb Rolf Turner:
On 22/09/2009, at 9:52 AM, Martin Batholdy wrote:
I use xtable to convert data.frames to html tables.
But when I use the print-command I always get the whole output
printed
even if I just w
On 22/09/2009, at 10:13 AM, Martin Batholdy wrote:
Am 21.09.2009 um 23:59 schrieb Rolf Turner:
On 22/09/2009, at 9:52 AM, Martin Batholdy wrote:
hi,
I use xtable to convert data.frames to html tables.
But when I use the print-command I always get the whole output
printed
even if I just
Am 21.09.2009 um 23:59 schrieb Rolf Turner:
On 22/09/2009, at 9:52 AM, Martin Batholdy wrote:
hi,
I use xtable to convert data.frames to html tables.
But when I use the print-command I always get the whole output
printed
even if I just want to save the html table into a variable;
tabl
On Sep 21, 2009, at 5:52 PM, Martin Batholdy wrote:
I use xtable to convert data.frames to html tables.
But when I use the print-command I always get the whole output printed
even if I just want to save the html table into a variable;
table <- print(xtable(CERAT), type="html")
How can I supp
On 22/09/2009, at 9:52 AM, Martin Batholdy wrote:
hi,
I use xtable to convert data.frames to html tables.
But when I use the print-command I always get the whole output printed
even if I just want to save the html table into a variable;
table <- print(xtable(CERAT), type="html")
How can I
On Sep 20, 2009, at 6:40 PM, Martin Batholdy wrote:
hi,
I want html code via the xtable package.
I have a data.frame and tried to use the print()-function.
But I only get the data.frame printed - no html arround it.
what do I have to change?
That, my son, is extremely hard to tell since k
> Hi again,
>
> one last annoying thing: how to deal with %, always when I use sweave to get
> a latex document the % comes as a comment and I cannot have % in my tables,
> how to sort out this annoying detail?
>
> thanks!
> Regards
> Welma
Hi Welma,
You need to escape the % sign, just as you woul
See the sanitize.* arguments to print.xtable.
On Sun, Aug 9, 2009 at 10:16 AM, Welma Pereira wrote:
> Hi again,
>
> one last annoying thing: how to deal with %, always when I use sweave to get
> a latex document the % comes as a comment and I cannot have % in my tables,
> how to sort out this anno
Hi again,
one last annoying thing: how to deal with %, always when I use sweave to get
a latex document the % comes as a comment and I cannot have % in my tables,
how to sort out this annoying detail?
thanks!
Regards
Welma
2009/8/9 Gabor Grothendieck
> latex() in the Hmisc package can group ro
latex() in the Hmisc package can group rows using rgroup= and n.group=
arguments.
On Sun, Aug 9, 2009 at 9:08 AM, Welma Pereira wrote:
> Duncan,
>
> Thanks a lot! it sorted out the problem. I was too worried about learning
> how to use sweave that forgot to try other things :-)
>
> Teysseyre, I sa
Duncan,
Thanks a lot! it sorted out the problem. I was too worried about learning
how to use sweave that forgot to try other things :-)
Teysseyre, I saw this doc but my table was large in width like almost not
fitting the paper size..
Its better now but I wonder how to make better tables using x
Ken-JP wrote:
>
> Is there a way to modify this code to generate RED numbers inside xtable
> for
> negative results in x.ts?
>
This post would probably have been better for R-help. Anyway, you can do it
easily by modifying print.xtable.R in the xtable package. If it is easier,
make a copy o
Found the answer. It seems to work to wrap longtables with this set of commands:
\renewcommand{\arraystretch}{0.6}
% make a longtable
%...
\renewcommand{\arraystretch}{1.0}
Hope this is useful to someone else.
On Mon, Jun 15, 2009 at 5:33 PM, Stephen J. Barr wrote:
> Hello,
>
> Quick R/LaTeX que
On Fri, 12 Jun 2009, Stephen J. Barr wrote:
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 i
Thanks Duncan, I'll try that with my data.
--- On Wed, 1/7/09, Duncan Mackay wrote:
> From: Duncan Mackay
> Subject: Re: [R] xtable-longtable question
> To: mazatlanmex...@yahoo.com
> Cc: r-help@r-project.org
> Date: Wednesday, January 7, 2009, 1:15 PM
> I use Sweave and
I use Sweave and longtable but have not used them together.
It can be done but you may find the package booktabs helpful for headers
and footers for longtable and tables
as it allows you to put different first and last page headers to the rest.
Something like (untested)
PS You do not need to pu
Try this:
print(xtable(mat2), type = "html", file = "test.html",
sanitize.text.function = force)
On Fri, Dec 5, 2008 at 3:43 PM, Tim Smith <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I was trying to get hyperlinks using xtable, but couldn't get the hyperlinks
> to function properly. For example, if I
On Fri, Dec 5, 2008 at 9:43 PM, Tim Smith <[EMAIL PROTECTED]> wrote:
> I was trying to get hyperlinks using xtable, but couldn't get the hyperlinks
> to function properly. For example, if I use
>
Perhaps hwriter [1] could be of use. Check its home page.
Liviu
[1] http://cran.at.r-project.org/web/
Hello Ani,
I am having the same problem with xtable and duplicate rownames. Would
it be possible for you to post your solution?
Best,
Sacha Kapoor
PhD Candidate
Department of Economics
University of Toronto
__
R-help@r-project.org mailing list
https
70 matches
Mail list logo