Dear R-users,

The following warning messages are displayed when I require a new package
that I am currently developing. Everything seems to work just fine though,
so I am wondering how to get rid of the warnings.

Warning messages:
1: Class "frame" is defined (with package slot 'kiwixposepreprod') but no
metadata object found to revise superClass information---not exported?
 Making a copy in package '.GlobalEnv'
2: Class "gTree" is defined (with package slot 'kiwixposepreprod') but no
metadata object found to revise superClass information---not exported?
 Making a copy in package '.GlobalEnv'
3: Class "grob" is defined (with package slot 'kiwixposepreprod') but no
metadata object found to revise superClass information---not exported?
 Making a copy in package '.GlobalEnv'
4: Class "gDesc" is defined (with package slot 'kiwixposepreprod') but no
metadata object found to revise superClass information---not exported?
 Making a copy in package '.GlobalEnv'


This new package creates a new S4 class with slots defined with S3 classes.
This new class is defined in the createMyClass function given below.
Furthermore, my package has a NAMESPACE and contains a .onLoad function
which calls the createMyClass function.


### FUNCTION ####
createMyClass <- function(){

  # Set unions of classes
 setOldClass(c('frame','gTree','grob','gDesc'))
 setClassUnion('character or NULL',c('character','NULL'),where=.GlobalEnv)
 setClassUnion('numeric or NULL',c('numeric','NULL'),where=.GlobalEnv)
 setClassUnion('my.frame',
               c('frame','gTree','grob','gDesc','NULL'),
                where=.GlobalEnv)

  setClass('mylegend',where=.GlobalEnv,
          representation(type       = 'character or NULL',
                          nb.line    = 'numeric or NULL',
                         legend.cex = 'numeric or NULL',
                          grid.frame = 'my.frame',
                         footnote   = 'character or NULL'),
           prototype(type = NULL,
                    nb.line = 0,
                     legend.cex = 1,
                    grid.frame = NULL,
                     footnote = NULL)
          )
}

##### NAMESPACE CONTENT #####
import(methods)
S3method(print, mylegend)
exportPattern("^[^\\.]")

Any feedback will be greatly appreciated.

Sebastien

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to