[R] How do I import packages with the package I've built?

Nutter, Benjamin NutterB at ccf.org
Fri Nov 16 17:12:44 CET 2007


I have successfully completed building a package to contain the
functions I commonly use.  However, I need to have other packages
installed in order for some of my functions to work.  I've been studying
the instructions on installing packages for about a month now, but still
haven't figured this one out.  From what I do understand, to import
additional packages I need some combination of commands in my
DESCRIPTION and NAMESPACE files.  Currently, these are what mine look
like:

DESCRIPTION
Package: myPackage
Type: Package
Title: Commonly used functions.
Version: 1.0
Date: 2007-11-08
Author: My Name
Maintainer: My Name <myfault at somewhere.net>
Description: Blah Blah Blah
License: R 2.3.0
Depends: MASS, survival


NAMESPACE
export(func1, func2, ... , funcx)

import(MASS, survival)


These pass all the checks, and the package installs just fine, but it
doesn't load MASS and survival when I load myPackage.  What am I doing
wrong?

Benjamin


P Please consider the environment before printing this e-mail

Cleveland Clinic is ranked one of the top hospitals
in America by U.S. News & World Report (2007).  
Visit us online at http://www.clevelandclinic.org for
a complete listing of our services, staff and
locations.


Confidentiality Note:  This message is intended for use\...{{dropped:13}}



More information about the R-help mailing list