From gabraham at csse.unimelb.edu.au  Tue Mar 10 11:02:07 2009
From: gabraham at csse.unimelb.edu.au (Gad Abraham)
Date: Tue, 10 Mar 2009 21:02:07 +1100
Subject: [Rd] S4 generic masking S3 generic when using namespace
Message-ID: <49B63A9F.60403@csse.unimelb.edu.au>

Hi,

I have two example packages, test1 and test2, where the only code in 
them is:

setGeneric("predict", function(object, ...) standardGeneric("predict"))

(get them from http://www.cs.mu.oz.au/~gabraham/test1.tar and 
http://www.cs.mu.oz.au/~gabraham/test2.tar)

The difference between them is that first does not have a namespace, and 
loads fine. The second has a namespace but generates a warning:
 > library(test2)

Attaching package: 'test2'


	The following object(s) are masked from package:stats :

	 predict



Is this an intended behaviour? If I ignore this masking warning, do I 
risk unintended consequences later down the track?

Thanks,
Gad



 > sessionInfo()
R version 2.8.1 (2008-12-22)
i386-apple-darwin8.11.1

locale:
en_AU.UTF-8/en_AU.UTF-8/C/C/en_AU.UTF-8/en_AU.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] test2_0.1


-- 
Gad Abraham
MEng Student, Dept. CSSE and NICTA
The University of Melbourne
Parkville 3010, Victoria, Australia
email: gabraham at csse.unimelb.edu.au
web: http://www.csse.unimelb.edu.au/~gabraham



[Rd] S4 generic masking S3 generic when using namespace
Gad Abraham