[Rd] eapply weirdness/bug

Mark.Bravington at csiro.au Mark.Bravington at csiro.au
Fri Feb 18 04:38:09 CET 2005

The following looks like an 'eapply' bug to me:

t/subtest> e <- new.env()
t/subtest> e$tempo <- quote( 1+'hi')

t/subtest> lapply( ls( e), function( x) length( get( x,e)))
[1] 3
# seems reasonable-- e$tempo is a 'call' object of length 3

t/subtest> eapply( e, length)
Error in 1 + "hi" : non-numeric argument to binary operator

t/subtest> eapply( e, length)
t/subtest> traceback()
1: eapply(e, length)

For some reason 'eapply' seems to *evaluate* objects of mode 'call' (it
happened with every call-mode object I tried). This shouldn't happen--
or should it?


Mark Bravington
CSIRO Mathematical & Information Sciences
Marine Laboratory
Castray Esplanade
Hobart 7001

ph (+61) 3 6232 5118
fax (+61) 3 6232 5012
mob (+61) 438 315 623

	[[alternative HTML version deleted]]

More information about the R-devel mailing list