[R] exporting methods/classes

Erin Hodgess hodgess at gator.dt.uh.edu
Sun Jan 8 08:30:17 CET 2006


Dear R People:

I'm still struggling with sending methods and classes as part of 
creating a new package.

Where does the .onLoad function go?  Within R itself or in a file
in one of the new package directories?


Here are my latest efforts:


Here's the last part of the woof1-Ex.Rout

> library('woof1')
Error in loadNamespace(package, c(which.lib.loc, lib.loc), 
keep.source = keep.source) : 
	in 'woof1' classes for export not defined: dog
Error: package/namespace load failed for 'woof1'
Execution halted



Here's the NAMESPACE
importFrom(graphics,plot)
exportClasses("dog")
exportMethods("plot","show")


thanks yet again,
Sincerely,
Erin 
mailto: hodgess at gator.uhd.edu




More information about the R-help mailing list