Re: [R] xtable does not print out units of a variable

2018-07-19 Thread Marc Schwartz via R-help
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 > &

Re: [R] xtable does not print out units of a variable

2018-07-19 Thread John Kane via R-help
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

Re: [R] xtable does not print out units of a variable

2018-07-19 Thread Shawn Way
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

Re: [R] xtable does not print out units of a variable

2018-07-18 Thread Jeff Newmiller
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

[R] xtable does not print out units of a variable

2018-07-18 Thread Shawn Way
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. The following is a MWE: library(xtable) library(units) data

Re: [R] Xtable with long column headings/names

2017-05-16 Thread BR_email
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

Re: [R] Xtable with long column headings/names

2017-05-16 Thread BR_email
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

Re: [R] Xtable with long column headings/names

2017-05-15 Thread John Kane via R-help
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

Re: [R] Xtable with long column headings/names

2017-05-15 Thread BR_email
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

Re: [R] Xtable with long column headings/names

2017-05-15 Thread BR_email
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

[R] Xtable with long column headings/names

2017-05-15 Thread Bruce Ratner PhD
R-help: I'm using xtable that produces a table in html with one-line for each of the long column headings/names. I would like to word wrap the column headings to break into two-lines. Any suggestion as to which argument needs adjustment is appreciated. Bruce ___

Re: [R] xtable: Width of Columns

2017-03-03 Thread Michael Dewey
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

[R] xtable: Width of Columns

2017-03-02 Thread G . Maubach
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", "Prozent") rownames(response) <- c("gesamte R�cksendungen (brutto) ", "auswertbar

Re: [R] xtable caption knitr

2015-02-24 Thread Ulises M. Alvarez
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_

Re: [R] xtable caption knitr

2015-02-24 Thread Michael Dewey
: ```{r xtable, results="asis"} library( xtable ) variableName <- c( "V03_1" ) age <- c( rep(1,10),rep(2,10),rep(3,10) ) gender <- c( rep("m",15), rep("f",15) ) df <- data.frame( age, gender ) t <- xtable( df, caption = "hello"

[R] xtable caption knitr

2015-02-24 Thread AURORA GONZALEZ VIDAL
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: ```{r xtable, results="asis"} library( xtable ) variableName  <- c( "V03_1" ) age <- c( rep(1,10),rep(2,10),re

Re: [R] xtable problems with xts objects

2014-07-30 Thread Stergios Marinopoulos
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

Re: [R] xtable problems with xts objects

2014-07-30 Thread Ista Zahn
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

[R] xtable problems with xts objects

2014-07-30 Thread Stergios Marinopoulos
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 reported as 1 it works.  I have included example below. Another question is how can I have the time index printed in place of the row number?   Thank

[R] xtable problems with xts objects

2014-07-30 Thread Stergios Marinopoulos
Hi,  I'm having trouble getting xtable to print a simple xts object.  When the frequency is 1800 seconds I get an error.  However when frequency(x) is reported as 1 it works.  I have included example below. Another question is how can I have the the time index printed in place of the row numbe

Re: [R] xtable: custom row.names, move caption to top

2013-11-27 Thread Michael Friendly
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

Re: [R] xtable: custom row.names, move caption to top

2013-11-27 Thread Rainer Schuermann
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

Re: [R] xtable: custom row.names, move caption to top

2013-11-27 Thread Rainer Schuermann
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

[R] xtable: custom row.names, move caption to top

2013-11-27 Thread Michael Friendly
With xtable, I'm producing one-way tables from table objects in horizontal form as shown below. I'd like to change the labels used for the rows and move the caption to the top of the table, as is typically standard for tables. I can hand-edit, but would prefer to do it in code. data(Saxony, p

Re: [R] xtable use plus minus

2013-09-12 Thread arun
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

Re: [R] xtable use plus minus

2013-09-12 Thread Duncan Mackay
ncan Mackay Department of Agronomy and Soil Science University of New England Armidale NSW 2351 Email: home: mac...@northnet.com.au -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Sachinthaka Abeywardana Sent: Friday, 13 September 2013

Re: [R] xtable use plus minus

2013-09-12 Thread arun
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

Re: [R] xtable use plus minus

2013-09-12 Thread arun
& 18.1$\pm$ & 3.2$\pm$ \\    \hline \end{tabular} \end{table} A.K. - Original Message - From: Sachinthaka Abeywardana To: "r-help@r-project.org" Cc: Sent: Thursday, September 12, 2013 8:46 PM Subject: [R] xtable use plus minus I am using a similar dataset to the

[R] xtable use plus minus

2013-09-12 Thread Sachinthaka Abeywardana
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/ hmi

[R] xtable Highlight the lowest and plus minus

2013-09-10 Thread Sachinthaka Abeywardana
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 highlight the smallest value in the Adam and Steve columns and, also p

Re: [R] xtable() with booktabs option problem

2013-05-24 Thread John Kane
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 > >

Re: [R] xtable() with booktabs option problem

2013-05-24 Thread Marc Schwartz
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

[R] xtable() with booktabs option problem

2013-05-24 Thread John Kane
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}{r

Re: [R] xtable with psych objects

2012-12-18 Thread Marc Schwartz
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

[R] xtable with psych objects

2012-12-18 Thread Simon Kiss
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 * Simon J. Kiss, PhD Assistant Professo

Re: [R] xtable prcomp

2012-02-23 Thread Charles Roosen
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Riccardo Romoli Sent: 22 February 2012 23:22 To: r-help@r-project.org Subject: [R] xtable prcomp Hi, I need to export to LaTex the summary of a PCA. So: myPCA <- prcomp(myDF) mySummary

[R] xtable prcomp

2012-02-22 Thread Riccardo Romoli
Hi, I need to export to LaTex the summary of a PCA. So: myPCA <- prcomp(myDF) mySummary <- summary(myPCA) # print(xtable(mySummary)) How can I export to LaTeX not all the summary but only the first nPCs?? Best Riccardo __ R-help@r-project.org mailing

Re: [R] xtable "beta" testing wanted

2012-02-07 Thread Ista Zahn
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:

[R] xtable "beta" testing wanted

2012-02-07 Thread Charles Roosen
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 hav

Re: [R] xtable and sweave: caption placement problem

2011-11-18 Thread Rainer Schuermann
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(

Re: [R] xtable and sweave: caption placement problem

2011-11-18 Thread Charles Roosen
l free to contact me. Best regards, Charlie Roosen xtable maintainer Charles Roosen, PhD Technical Director Mango Solutions AG -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of ren...@vannieuwkoop.ch Sent: 18 November 2011 09:33 To: r-

[R] xtable and sweave: caption placement problem

2011-11-18 Thread renger
Dear All I am running Sweave with xtable and want to put the caption placement on top. But this does not work. Any idea what is going wrong? Here is an example that runs properly with the exception of the caption placement in the pdf-file. \documentclass[11pt,a4paper]{article} \usepackage

Re: [R] xtable with \begin{tabular} and only.contents

2011-10-28 Thread Trevor Davies
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

Re: [R] xtable with \begin{tabular} and only.contents

2011-10-28 Thread Duncan Murdoch
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

[R] xtable with \begin{tabular} and only.contents

2011-10-28 Thread Trevor Davies
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 argume

Re: [R] xtable with conditional formatting using \textcolor

2011-09-06 Thread Brian Diggs
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

Re: [R] xtable with conditional formatting using \textcolor

2011-09-06 Thread eldor ado
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

Re: [R] xtable - caption missing with float=FALSE

2011-08-10 Thread Marc Schwartz
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

[R] xtable - caption missing with float=FALSE

2011-08-10 Thread Zev Ross
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 has a caption (if you want to see it http://www.zevross.c

Re: [R] xtable with conditional formatting using \textcolor

2011-06-01 Thread Walmes Zeviani
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

Re: [R] xtable with conditional formatting using \textcolor

2011-06-01 Thread Marc Schwartz
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 > > #-

[R] xtable with conditional formatting using \textcolor

2011-06-01 Thread Walmes Zeviani
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 #- # code R da <- data.frame(id=le

[R] xtable without a loop alongside a ggplot

2011-05-04 Thread Justin Haynes
I would like to create a table of my points and identify which 'quadrant' of a plot they are in with the 'origin' at the means. the kicker is i would like to display it right next to or below a ggplot of the data. Maybe xtable isnt the right thing to use, but its the only thing i can think of. A

Re: [R] xtable

2010-07-22 Thread Kingsford Jones
> On Jul 21, 2010, at 8:20 PM, John Kane wrote: > >> 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 >&

Re: [R] xtable

2010-07-21 Thread David Winsemius
: 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 xtable? Commands are: modelo1 = lm(Y~X1 + X2) influencia = influence.measures(modelo1) require(xtable) xtable(influencia)

Re: [R] xtable

2010-07-21 Thread John Kane
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 regress

[R] xtable

2010-07-21 Thread Silvano
Hi, How do I build a table from a regression model adjusted using xtable? Commands are: modelo1 = lm(Y~X1 + X2) influencia = influence.measures(modelo1) require(xtable) xtable(influencia) but it isn't work. Thanks, -- Silvano Cesar da Costa Departamento

Re: [R] xtable with ifelse statement

2010-07-21 Thread Jannis
10: > Von: vivi84 > Betreff: [R] xtable with ifelse statement > An: r-help@r-project.org > Datum: Mittwoch, 21. Juli, 2010 07:23 Uhr > > 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

[R] xtable with ifelse statement

2010-07-21 Thread vivi84
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

Re: [R] xtable for latex: setting some values globally

2010-06-23 Thread stefan.d...@gmail.com
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

Re: [R] xtable for latex: setting some values globally

2010-06-23 Thread Hadley Wickham
> 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

[R] xtable for latex: setting some values globally

2010-06-23 Thread stefan.d...@gmail.com
Dear All, a quick xtable question. I do have quite a bunch of tables in my latex document which I produce with xtable. That works fine so far. But I wonder is it possible set some values such as "environement", "caption.placement", or "size" globally so that it applies for table unless otherwise s

Re: [R] xtable with Sweave

2010-06-14 Thread James W. MacDonald
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') @

Re: [R] xtable with Sweave

2010-06-14 Thread Marc Schwartz
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

[R] xtable with Sweave

2010-06-14 Thread Silvano
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') @ I'm getting the following

Re: [R] xtable - how to add a "sum of values in a row" column?

2009-09-28 Thread Ken-JP
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

Re: [R] xtable - how to add a "sum of values in a row" column?

2009-09-28 Thread Henrique Dallazuanna
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

Re: [R] xtable - how to add a "sum of values in a row" column?

2009-09-28 Thread Ken-JP
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

[R] xtable - how to add a "sum of values in a row" column?

2009-09-27 Thread Ken-JP
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 Ti

Re: [R] xtable - print - suppress output

2009-09-24 Thread David Winsemius
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

Re: [R] xtable - print - suppress output

2009-09-24 Thread Thomas Lumley
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

Re: [R] xtable - print - suppress output

2009-09-21 Thread Gabor Grothendieck
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

Re: [R] xtable - print - suppress output

2009-09-21 Thread Charlie Sharpsteen
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

Re: [R] xtable - print - suppress output

2009-09-21 Thread Don MacQueen
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

Re: [R] xtable - print - suppress output

2009-09-21 Thread David Winsemius
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

Re: [R] xtable - print - suppress output

2009-09-21 Thread Rolf Turner
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

Re: [R] xtable - print - suppress output

2009-09-21 Thread Martin Batholdy
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

Re: [R] xtable - print - suppress output

2009-09-21 Thread David Winsemius
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

Re: [R] xtable - print - suppress output

2009-09-21 Thread 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; table <- print(xtable(CERAT), type="html") How can I

[R] xtable - print - suppress output

2009-09-21 Thread Martin Batholdy
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 suppress that output is printed? thanks!

Re: [R] xtable + print (html)

2009-09-20 Thread David Winsemius
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

[R] xtable + print (html)

2009-09-20 Thread Martin Batholdy
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? thanks! __ R-help@r-project.org mailing list https://sta

[R] xtable "longtable" with caption on "top"

2009-08-25 Thread Liviu Andronic
Dear all I would like to export a matrix to a LaTeX "longtable" environment that would have its caption on top of the table. However xtable() seems to bar me from doing this: > print(xtable(mtcars[1:10,c(1,2)], caption="CARS"), + tabular.environment="longtable", caption.placement="top" + , floating

Re: [R] xtable, sweave and resizebox

2009-08-10 Thread Ista Zahn
> 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

Re: [R] xtable, sweave and resizebox

2009-08-09 Thread Gabor Grothendieck
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

Re: [R] xtable, sweave and resizebox

2009-08-09 Thread Welma Pereira
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

Re: [R] xtable, sweave and resizebox

2009-08-09 Thread Gabor Grothendieck
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

Re: [R] xtable, sweave and resizebox

2009-08-09 Thread Welma Pereira
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

[R] xtable, sweave and resizebox

2009-08-07 Thread Welma Pereira
does anyone know to rezize a table produzed by xtable? The size of my table is too big and I would like to resize it like using resizebox but it gives an erros when I try using it using it its fine \SweaveOpts{echo=false} <>= xtable(stats0,caption='Número de transacções dos artigos frequentes e

Re: [R] xtable formatting: RED for negative numbers?

2009-07-29 Thread cameron.bracken
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

[R] xtable formatting: RED for negative numbers?

2009-07-28 Thread Ken-JP
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? Thank

Re: [R] xtable with longtable is doublespaced, rather than single as intended

2009-06-15 Thread Stephen J. Barr
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

[R] xtable with longtable is doublespaced, rather than single as intended

2009-06-15 Thread Stephen J. Barr
Hello, Quick R/LaTeX question. I have the following code within a .Rnw file: <>= cVec <- c("RATE","SVC.PCT","AGR.PCT","IND.PCT","density00") x.big <- xtable(aggregate(qp3[,cVec], list(qp3[,"COURT"]), mean)) colnames(x.big)[1] <- "COURT" print(x.big, tabular.environment="longtable", include.rowna

[R] xtable with longtable is doublespaced, rather than single as intended

2009-06-15 Thread Stephen J. Barr
Hello, Quick R/LaTeX question. I have the following code within a .Rnw file: <>= cVec <- c("RATE","SVC.PCT","AGR.PCT","IND.PCT","density00") x.big <- xtable(aggregate(qp3[,cVec], list(qp3[,"COURT"]), mean)) colnames(x.big)[1] <- "COURT" print(x.big, tabular.environment="longtable", include.rowna

Re: [R] xtable for plm objects

2009-06-12 Thread Achim Zeileis
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

[R] xtable for plm objects

2009-06-12 Thread Stephen J. Barr
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 fo

Re: [R] xtable-longtable question

2009-01-08 Thread Felipe Carrillo
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

Re: [R] xtable-longtable question

2009-01-07 Thread Duncan Mackay
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

[R] xtable-longtable question

2009-01-07 Thread Felipe Carrillo
Hello: I am using Sweave to generate a PDF with figures and tables and was wondering if is possible to carry on table headers and some kind of caption like 'Continued' to the next PDF page when creating long tables. Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior

Re: [R] xtable html links

2008-12-06 Thread Gabor Grothendieck
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

  1   2   >