Java Mailing List Archive

http://www.junlu.com/

Subjects
Home
mod jk2 https
Donation of JAXP 1 3 Sources to Apache
R annoyances
RE: Finding out when the aspnet admin worker process has recycled
Favorite Linux Distribution
eigenvalues of a circulant matrix
Apache Install
Reachin apache from outside
Ant should have an ext directory
Warning: Documentroot doesn 't exist
Can this be Done?
RE: Multilanguage Application
RE: Simple Question On setting up Sub Domain site
Lack of independence in anova()
How to close connection instead of sending 403?
winning the case for ANT
Re: adding php
New Ant GUI 'Ant 's Nest '
Narrowing Down A Strange Problem
Ant Task: sshexec
R Graph Gallery : categorization of the graphs
I 've been hacked, I need some help please
RE: Anyone working with DotNetNuke?
RE: Exception Handling Opinion
hex format
RE: IIS stopped working :(
<for > Build Failed:problem
RE: Separation of Objects from Logic
RE: Tracking pages with long request execution time
sending email to multiple destination
Web Site
ant UI
Easy cut & paste from Excel to R?
Win32 Apache Restart
Improving Tasks
HELP! PLEASE!
RE: Adding Controls to a Page
read table
RE: ASPNET account doesn 't exist!
Best way to uninstall Apache2 on red hat
from win to linux how to web page
XMLParseException changes and creation of XMLLocator2
Re Post: rewrite backslash to forward slash
Target or macrodef?
Page display problem XPSP2
Authentication problems
Dynamic Dictionary Data Type?
Newbie unable access my www from outside
off topic question: Latex and R in industries
Conflict between xtable and Hmisc when using Sweave?
Very old problem without any new solution
mod rewrite help
Basic Authentication question
RE: Code Security
calling ant from java program
prevent double signing
Re: Controlling Copy/Paste/Print
Using R to illustrate the Central Limit Theorem
web server slow too much slow
access to user directories
Links
Home
Official R Project Site
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Conflict between xtable and Hmisc when using Sweave?

Conflict between xtable and Hmisc when using Sweave?

2005-05-16       - By Sander Oom
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Dear David,

I would like to use summarize(Hmisc) and print.xtable(xtable) in a
single Sweave document, but a conflict with the 'label' function
prohibits this at the moment!

Would you be able to correct the conflicting code? I will gladly test
the new package!

I have tried latex(Hmisc) to export the anova table, but results are not
promising! I prefer xtable!!

Thanks,

Sander.

Frank E Harrell Jr wrote:
> Sander Oom wrote:
>> Dear Frank,
>>
>> I have a Sweave document in which I export anova (aov) tables to Latex
>> and calculate some summary statistics with summarize{Hmisc} for a
>> graph (as in the example below).
>>
>> I currently use the following code for the aov tables:
>> <<results=tex>>=
>>   tmp <- datGrassHC[datGrassHC$Loc > 0 & datGrassHC$Loc < 9 ,]
>>   tmpAov <- aov(Height~Geology*Altitude*Origin*BinInOut , data=tmp)
>>   tmpTable <- xtable (tmpAov ,
>>     caption="ANOVA table for vegetation height.",
>>     label="tab:AnovaHeight"
>>     )
>>   print.xtable(tmpTable, type="latex", floating=TRUE,
>>     table.placement="ht", caption.placement="top",
>>     latex.environments=c("center"))
>>     )
>> @
>>
>> I used xtables, because it has a working aov example. I would be happy
>> to use an alternative if I knew how! Would you have sample code to
>> illustrate how to export an aov table to Latex using latex{Hmisc}.
>>
>> Thanks very much for your help,
>>
>> Sander.
>>
>> Frank E Harrell Jr wrote:
>>
>>> Sander Oom wrote:
>>>
>>>> Dear R users,
>>>>
>>>> The Sweave code below runs fine, as it is. However, an error occurs
>>>> when the line 'library(xtable)' is uncommented:
>>>> Error:  chunk 1
>>>> Error in "label<-"(`*tmp*`, value = "month") :
>>>>         no applicable method for "label<-"
>>>>
>>>> Is anybody aware of this and knows a workaround?
>>>>
>>>> Thanks,
>>>>
>>>> Sander.
>>>>
>>>> *******************
>>>>
>>>> \documentclass[a4paper]{article}
>>>> \title{Sweave Test for summarize}
>>>> \author{Sander Oom}
>>>>
>>>> \usepackage{a4wide}
>>>>
>>>> \begin{document}
>>>>
>>>> \maketitle
>>>>
>>>> \begin{figure}[ht]
>>>> \begin{center}
>>>> <<fig=TRUE,echo=FALSE>>=
>>>>   # library(xtable)
>>>>   library(Hmisc)
>>>>   set.seed(111)
>>>>   dfr <- expand.grid(month=1:12, year=c(1997,1998), reps=1:100)
>>>>   month <- dfr$month
>>>>   year <- dfr$year
>>>>   y <- abs(month-6.5) + 2*runif(length(month)) + year-1997
>>>>   s <- summarize(y, llist(month,year), smedian.hilow, conf.int=.5)
>>>>   print(xYplot(Cbind(y,Lower,Upper) ~ month, groups=year, data=s,
>>>>         keys='lines', method='alt', type='b'))
>>>> @
>>>> \end{center}
>>>> \end{figure}
>>>>
>>>> \end{document}
>>>>
>>>> ************************
>>>>
>>>>
>>>>
>>>>  > version
>>>>          _
>>>> platform i686-pc-linux-gnu
>>>> arch     i686
>>>> os       linux-gnu
>>>> system   i686, linux-gnu
>>>> status
>>>> major    2
>>>> minor    1.0
>>>> year     2005
>>>> month    04
>>>> day      18
>>>> language R
>>>>
>>>>
>>>
>>> I feel this is an xtable problem because Hmisc has being using label
>>> and label<- since 1991.
>>>
>>> Frank
>>>
>>
>
> There are ways to make functions from one area override those from
> another, but the real solution is to ask the xtable author not to have
> functions that conflict with the (older) Hmisc package.  -Frank
>

--
--------------------------------------------
Dr Sander P. Oom
Animal, Plant and Environmental Sciences,
University of the Witwatersrand
Private Bag 3, Wits 2050, South Africa
Tel (work)      +27 (0)11 717 64 04
Tel (home)      +27 (0)18 297 44 51
Fax             +27 (0)18 299 24 64
Email   sander@(protected)
Web     www.oomvanlieshout.net/sander

______________________________________________
R-help@(protected) mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

©2008 junlu.com - Jax Systems, LLC, U.S.A.