I have a peculiar problem that I'm sure is a simple one, but I can't figure out what my mistake is. Can someone enlighten me? I have a simple file, class.R: ## setClass("abc",representation(a = "character", b = "ANY")) I have a package directory ExpressCGH1 made with package.skeleton. The package happily builds and installs, but R CMD check fails with (ignoring the documenation warnings, etc.):> version_ platform powerpc-apple-darwin7.9.0 arch powerpc os darwin7.9.0 system powerpc, darwin7.9.0 status Patched major 2 minor 1.1 year 2005 month 08 day 12 language R %%% R CMD check -l '/User s/sdavis/Library/R/library' ExpressCGH1 * checking for working latex ... OK * using log directory '/Users/sdavis/Work/R-Programs/packages/devel/ExpressCGH/E xpressCGH1.Rcheck' * using R version 2.1.1, 2005-08-12 * checking for file 'ExpressCGH1/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'ExpressCGH1' version '1.0' * checking if this is a source package ... OK * Installing *source* package 'ExpressCGH1' ... ** libs WARNING: no source files found chmod: /Users/sdavis/Library/R/library/ExpressCGH1/libs/*: No such file or direc tory ** R ** help >>> Building/Updating help pages for package 'ExpressCGH1' Formats: text html latex example convertDNAcopyOutput text html latex example missing link(s): ~~fun~~ ** building package indices ... * DONE (ExpressCGH1) * checking package directory ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking DESCRIPTION meta-information ... OK * checking package dependencies ... OK * checking index information ... OK * checking package subdirectories ... WARNING Subdirectory 'src' contains no source files. * checking R files for syntax errors ... OK * checking R files for library.dynam ... OK * checking S3 generic/method consistency ... WARNING Error: unable to load R code in package 'ExpressCGH1' Call sequence: 2: stop(gettextf("unable to load R code in package '%s'", libraryPkgName(package )), call. = FALSE, domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose FALSE) Execution halted See section 'Generic functions and methods' of the 'Writing R Extensions' manual. * checking replacement functions ... WARNING Error: unable to load R code in package 'ExpressCGH1' Call sequence: 2: stop(gettextf("unable to load R code in package '%s'", libraryPkgName(package )), call. = FALSE, domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose FALSE) Execution halted In R, the argument of a replacement function which corresponds to the right hand side must be named 'value'. * checking foreign function calls ... WARNING Error: unable to load R code in package 'ExpressCGH1' Call sequence: 2: stop(gettextf("unable to load R code in package '%s'", libraryPkgName(package )), call. = FALSE, domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose FALSE) Execution halted See section 'System and foreign language interfaces' of the 'Writing R Extensions' manual. * checking Rd files ... WARNING Rd files with likely Rd problems: Unaccounted top-level text in file '/Users/sdavis/Work/R-Programs/packages/devel /ExpressCGH/ExpressCGH1/man/convertDNAcopyOutput.Rd': Following section 'note': "\n\n ~Make other sections like Warning with \\section{Warning }{....} ~\n\n" Rd files with non-standard keywords: /Users/sdavis/Work/R-Programs/packages/devel/ExpressCGH/ExpressCGH1/man/conv er tDNAcopyOutput.Rd: ~kwd1 ~kwd2 Each '\keyword' entry should specify one of the standard keywords (as listed in file 'KEYWORDS.db' in the 'doc' subdirectory of the R home directory). See chapter 'Writing R documentation files' in manual 'Writing R Extensions'. * checking for missing documentation entries ... ERROR Error: unable to load R code in package 'ExpressCGH1'
Did you remember to declare a dependency on package 'methods'? I suspect not. Please see `Writing R Extensions'. setClass is not part of base R, and those checks are being run with base R only. I expect your package will not load when R is run with no default packages. (Quite a few people run R without package 'methods' for speed, especially on startup -- it takes about half the startup time.) On Mon, 15 Aug 2005, Sean Davis wrote:> I have a peculiar problem that I'm sure is a simple one, but I can't figure > out what my mistake is. Can someone enlighten me? I have a simple file, > class.R: > > ## > setClass("abc",representation(a = "character", b = "ANY")) > > I have a package directory ExpressCGH1 made with package.skeleton. The > package happily builds and installs, but R CMD check fails with (ignoring > the documenation warnings, etc.): > >> version > _ > platform powerpc-apple-darwin7.9.0 > arch powerpc > os darwin7.9.0 > system powerpc, darwin7.9.0 > status Patched > major 2 > minor 1.1 > year 2005 > month 08 > day 12 > language R > > > > %%% R CMD check -l '/User > s/sdavis/Library/R/library' ExpressCGH1 > * checking for working latex ... OK > * using log directory > '/Users/sdavis/Work/R-Programs/packages/devel/ExpressCGH/E > xpressCGH1.Rcheck' > * using R version 2.1.1, 2005-08-12 > * checking for file 'ExpressCGH1/DESCRIPTION' ... OK > * checking extension type ... Package > * this is package 'ExpressCGH1' version '1.0' > * checking if this is a source package ... OK > > * Installing *source* package 'ExpressCGH1' ... > ** libs > WARNING: no source files found > chmod: /Users/sdavis/Library/R/library/ExpressCGH1/libs/*: No such file or > direc > tory > ** R > ** help > >>> Building/Updating help pages for package 'ExpressCGH1' > Formats: text html latex example > convertDNAcopyOutput text html latex example > missing link(s): ~~fun~~ > ** building package indices ... > * DONE (ExpressCGH1) > > * checking package directory ... OK > * checking for portable file names ... OK > * checking for sufficient/correct file permissions ... OK > * checking DESCRIPTION meta-information ... OK > * checking package dependencies ... OK > * checking index information ... OK > * checking package subdirectories ... WARNING > Subdirectory 'src' contains no source files. > * checking R files for syntax errors ... OK > * checking R files for library.dynam ... OK > * checking S3 generic/method consistency ... WARNING > Error: unable to load R code in package 'ExpressCGH1' > Call sequence: > 2: stop(gettextf("unable to load R code in package '%s'", > libraryPkgName(package > )), > call. = FALSE, domain = NA) > 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose > FALSE) > Execution halted > See section 'Generic functions and methods' of the 'Writing R Extensions' > manual. > * checking replacement functions ... WARNING > Error: unable to load R code in package 'ExpressCGH1' > Call sequence: > 2: stop(gettextf("unable to load R code in package '%s'", > libraryPkgName(package > )), > call. = FALSE, domain = NA) > 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose > FALSE) > Execution halted > In R, the argument of a replacement function which corresponds to the right > hand side must be named 'value'. > * checking foreign function calls ... WARNING > Error: unable to load R code in package 'ExpressCGH1' > Call sequence: > 2: stop(gettextf("unable to load R code in package '%s'", > libraryPkgName(package > )), > call. = FALSE, domain = NA) > 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose > FALSE) > Execution halted > See section 'System and foreign language interfaces' of the 'Writing R > Extensions' manual. > * checking Rd files ... WARNING > Rd files with likely Rd problems: > Unaccounted top-level text in file > '/Users/sdavis/Work/R-Programs/packages/devel > /ExpressCGH/ExpressCGH1/man/convertDNAcopyOutput.Rd': > Following section 'note': > "\n\n ~Make other sections like Warning with \\section{Warning }{....} > ~\n\n" > > Rd files with non-standard keywords: > > /Users/sdavis/Work/R-Programs/packages/devel/ExpressCGH/ExpressCGH1/man/conv > er > tDNAcopyOutput.Rd: > ~kwd1 ~kwd2 > Each '\keyword' entry should specify one of the standard keywords (as > listed in file 'KEYWORDS.db' in the 'doc' subdirectory of the R home > directory). > > See chapter 'Writing R documentation files' in manual 'Writing R > Extensions'. > * checking for missing documentation entries ... ERROR > Error: unable to load R code in package 'ExpressCGH1' > > ______________________________________________ > R-help at 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 >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On 8/15/05, Sean Davis <sdavis2 at mail.nih.gov> wrote:> I have a peculiar problem that I'm sure is a simple one, but I can't figure > out what my mistake is. Can someone enlighten me? I have a simple file, > class.R: > > ## > setClass("abc",representation(a = "character", b = "ANY")) > > I have a package directory ExpressCGH1 made with package.skeleton. The > package happily builds and installs, but R CMD check fails with (ignoring > the documenation warnings, etc.):Can you declare a slot to have class "ANY"? You can use class "ANY" in a method signature but I don't think you can use it for a slot. Try to see if you can attach the package in R. That may give more informative errors.> > > version > _ > platform powerpc-apple-darwin7.9.0 > arch powerpc > os darwin7.9.0 > system powerpc, darwin7.9.0 > status Patched > major 2 > minor 1.1 > year 2005 > month 08 > day 12 > language R > > > > %%% R CMD check -l '/User > s/sdavis/Library/R/library' ExpressCGH1 > * checking for working latex ... OK > * using log directory > '/Users/sdavis/Work/R-Programs/packages/devel/ExpressCGH/E > xpressCGH1.Rcheck' > * using R version 2.1.1, 2005-08-12 > * checking for file 'ExpressCGH1/DESCRIPTION' ... OK > * checking extension type ... Package > * this is package 'ExpressCGH1' version '1.0' > * checking if this is a source package ... OK > > * Installing *source* package 'ExpressCGH1' ... > ** libs > WARNING: no source files found > chmod: /Users/sdavis/Library/R/library/ExpressCGH1/libs/*: No such file or > direc > tory > ** R > ** help > >>> Building/Updating help pages for package 'ExpressCGH1' > Formats: text html latex example > convertDNAcopyOutput text html latex example > missing link(s): ~~fun~~ > ** building package indices ... > * DONE (ExpressCGH1) > > * checking package directory ... OK > * checking for portable file names ... OK > * checking for sufficient/correct file permissions ... OK > * checking DESCRIPTION meta-information ... OK > * checking package dependencies ... OK > * checking index information ... OK > * checking package subdirectories ... WARNING > Subdirectory 'src' contains no source files. > * checking R files for syntax errors ... OK > * checking R files for library.dynam ... OK > * checking S3 generic/method consistency ... WARNING > Error: unable to load R code in package 'ExpressCGH1' > Call sequence: > 2: stop(gettextf("unable to load R code in package '%s'", > libraryPkgName(package > )), > call. = FALSE, domain = NA) > 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose > FALSE) > Execution halted > See section 'Generic functions and methods' of the 'Writing R Extensions' > manual. > * checking replacement functions ... WARNING > Error: unable to load R code in package 'ExpressCGH1' > Call sequence: > 2: stop(gettextf("unable to load R code in package '%s'", > libraryPkgName(package > )), > call. = FALSE, domain = NA) > 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose > FALSE) > Execution halted > In R, the argument of a replacement function which corresponds to the right > hand side must be named 'value'. > * checking foreign function calls ... WARNING > Error: unable to load R code in package 'ExpressCGH1' > Call sequence: > 2: stop(gettextf("unable to load R code in package '%s'", > libraryPkgName(package > )), > call. = FALSE, domain = NA) > 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose > FALSE) > Execution halted > See section 'System and foreign language interfaces' of the 'Writing R > Extensions' manual. > * checking Rd files ... WARNING > Rd files with likely Rd problems: > Unaccounted top-level text in file > '/Users/sdavis/Work/R-Programs/packages/devel > /ExpressCGH/ExpressCGH1/man/convertDNAcopyOutput.Rd': > Following section 'note': > "\n\n ~Make other sections like Warning with \\section{Warning }{....} > ~\n\n" > > Rd files with non-standard keywords: > > /Users/sdavis/Work/R-Programs/packages/devel/ExpressCGH/ExpressCGH1/man/conv > er > tDNAcopyOutput.Rd: > ~kwd1 ~kwd2 > Each '\keyword' entry should specify one of the standard keywords (as > listed in file 'KEYWORDS.db' in the 'doc' subdirectory of the R home > directory). > > See chapter 'Writing R documentation files' in manual 'Writing R > Extensions'. > * checking for missing documentation entries ... ERROR > Error: unable to load R code in package 'ExpressCGH1' > > ______________________________________________ > R-help at 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 >