From r.hijmans at gmail.com  Wed Mar 11 15:40:44 2009
From: r.hijmans at gmail.com (Robert Hijmans)
Date: Wed, 11 Mar 2009 22:40:44 +0800
Subject: [Rd] configure fail for XML package on freebsd
In-Reply-To: <307b90470903110657o14a7178ere9c5a5ea06b0d91d@mail.gmail.com>
References: <307b90470903110428i1635c94btd2f457b893e3580c@mail.gmail.com>
	<49B7B930.9090003@wald.ucdavis.edu>
	<307b90470903110657o14a7178ere9c5a5ea06b0d91d@mail.gmail.com>
Message-ID: <dc22b2570903110740i1b2785end92d99e6bb3a2513@mail.gmail.com>

I would like to write an S4 generic for 'median', but I am not sure
how to do this properly as the function does not have a "..." argument

I can do this

setGeneric("median", function(x, na.rm=FALSE)
	standardGeneric("median"))

but I want to be able to pass it a number of objects of the same
class, so I need a ... argument; or use signature='list' which is not
very useful.

I can do this:

setGeneric("median", function(x, ..., na.rm=FALSE)
	standardGeneric("median"))

and

setMethod('median', signature(x='ANY'),
function(x, ..., na.rm=FALSE){ x <- c(x, ...)
return(stats::median(x, na.rm=na.rm))
#	}
#)

setMethod("median", signature(x='Raster'),
	function(x, ..., na.rm=FALSE){

#		rasters <- list(...)



[Rd] configure fail for XML package on freebsd
Robert Hijmans