pre.install
for would-be packages that have a .onLoad
function, and are therefore assumed to want a namespace. Produces defaults for the import, export, and S3Methods. You can modify this information prior to the NAMESPACE file being created, using the pre-install hook mechanism. The default for import
is taken from the DESCRIPTION file, but the defaults for export and S3 methods are deduced from your functions, and are described below.# Don't call this directly-- pre.install will do it automatically for you
make.NAMESPACE( env=1, path=attr( env, "path"),
description=read.dcf( file.path( path, "DESCRIPTION"))[1,], more.exports=character( 0))
c( ..., Author="R.A. Fisher", ...)
. By default, read from existing file.find.documented(doctype="any")
unless they appear to be S3 methods, plus any functions that have a non-NULL export.me
attribute. The latter is a cheap way of arranging for a function to be exported, but without formal documentation (is that wise??). pre.install
will incorporate any undocumented export.me
functions in the "mypack-internal.Rd" file, so that RCMD CHECK will be happy.
The S3 methods are all the functions whose names start "<<>
. The generics that are checked are (i) the names of the character vector .knownS3Generics
in package UseMethod
); (iii) any plausible-looking generic in your would-be package (effectively the same criterion). Documented functions which look like methods but whose flat-doc documentation names them explicitly in the USAGE section (e.g. referring to print.myclass(...)
rather than just print(...)
, the latter being how you're supposed to document methods) are assumed not be methods.pre.install
, flatdoc