[R] vague errors on R CMD check for very minimal S4-style package

From: Roels, Steven <Steven.Roels_at_mpi.com>
Date: Wed 07 Jun 2006 - 06:52:58 EST

Hello,

I have a very minimal package "simplepkg" (DESCRIPTION, NAMESPACE, and R) with S4 classes/methods (defines a class "foo" and a show method for that class" - both the class and show method are exported). I can seemingly install the package, then load and use it:

> sessionInfo()
Version 2.3.1 (2006-06-01)
sparc-sun-solaris2.10

attached base packages:

[1] "methods"   "stats"     "graphics"  "grDevices" "utils"
"datasets"  "base"     

> library(simplepkg,lib.loc="/home/roels/R/lib")
>
> getClass("foo")

Slots:

                          
Name:       name       age

Class: character numeric
> 
> myfoo <- new("foo",name="abc",age=10)
> myfoo

I am abc
>

But when I do R CMD check, it fails (or perhaps the "errors" are really "warnings"??):


sun890% R CMD check simplepkg
* checking for working latex ... OK

Here are the file contents:


sun890% cat DESCRIPTION
Package: simplepkg
Type: Package
Title: Does stuff
Version: 0.1-1
Date: 2006-06-06
Author: Me
Maintainer: Also Me <me@here.com>
Description: Does interesting stuff
License: GPL

sun890% cat NAMESPACE
exportClasses("foo")
exportMethods("show")

### cat simplepkg.R #class def and show method  

setClass("foo",representation(name="character",age="numeric"))

setMethod("show", "foo", function(object) cat("I am ",object@name,"\n",sep=" "))

### cat zzz.R # required .onLoad for use of S4-style classes/methods
.onLoad <- function(lib,pkg) require(methods)

As I said, the package "seems" to work, but I wanted to be sure I wasn't missing something that was going to come back to bite me later.

Thanks,

-Steve



Steve Roels, Ph.D. Senior Scientist I
Computational Biology
Millennium Pharmaceuticals, Inc
640 Memorial Drive
Cambridge, MA 02139-4815

This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 07 06:56:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 07 Jun 2006 - 08:10:53 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.