[R] Conflict between xtable and Hmisc when using Sweave?

From: Sander Oom <slist_at_oomvanlieshout.net>
Date: Fri 13 May 2005 - 22:21:24 EST


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
-- 
--------------------------------------------
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@oomvanlieshout.net
Web     www.oomvanlieshout.net/sander

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri May 13 22:28:04 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:45 EST