I am having problems porting a package to R-1.8.0 where I have complex S4 classes with slots inheriting from POSIXct. For example:> setClass("test1", representation(date="POSIXct"))[1] "test1"> new("test1", date=as.POSIXct("2003-10-09"))Error in ext@test(object) : couldn't find function "%in %" Under R-1.7.1 this worked fine and generated the following:> new("test1", date=as.POSIXct("2003-10-09"))An object of class "test1" Slot "date": [1] "2003-10-09 GMT Standard Time" Any thoughts would be greatly appreciated ... Regards, John I am working with Windows NT 4.0> R.version_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 8.0 year 2003 month 10 day 08 language R ********************************************************************** This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}}
Marsland, John wrote:> I am having problems porting a package to R-1.8.0 where I have complex S4 > classes with slots inheriting from POSIXct. For example: > > >>setClass("test1", representation(date="POSIXct")) > > [1] "test1" > >>new("test1", date=as.POSIXct("2003-10-09")) > > Error in ext@test(object) : couldn't find function "%in %" > > Under R-1.7.1 this worked fine and generated the following: > >>new("test1", date=as.POSIXct("2003-10-09")) > > An object of class "test1" > Slot "date": > [1] "2003-10-09 GMT Standard Time" > > Any thoughts would be greatly appreciated ...It's a typo in methods:::.setOldIs() "%in %" --> "%in%" (might be fixed in a recent r-patched - I have no available here right now) Uwe Ligges> Regards, > > John > > I am working with Windows NT 4.0 > >>R.version > > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 1 > minor 8.0 > year 2003 > month 10 > day 08 > language R > > > > ********************************************************************** > This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}} > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
It's a bug: oldClass.R: substitute(CLASS %in % attr(object, "class"), list(CLASS = cl)) has a typo. Now corrected in R-patched thank you. On Mon, 3 Nov 2003, Marsland, John wrote:> > I am having problems porting a package to R-1.8.0 where I have complex S4 > classes with slots inheriting from POSIXct. For example: > > > setClass("test1", representation(date="POSIXct")) > [1] "test1" > > new("test1", date=as.POSIXct("2003-10-09")) > Error in ext@test(object) : couldn't find function "%in %" > > Under R-1.7.1 this worked fine and generated the following: > > new("test1", date=as.POSIXct("2003-10-09")) > An object of class "test1" > Slot "date": > [1] "2003-10-09 GMT Standard Time" > > Any thoughts would be greatly appreciated ... > > Regards, > > John > > I am working with Windows NT 4.0 > > R.version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 1 > minor 8.0 > year 2003 > month 10 > day 08 > language R > > > > ********************************************************************** > This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}} > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel > >-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595