[R-pkg-devel] tools::checkReplaceFuns gives results I don't understand
Richard M. Heiberger
rmh at temple.edu
Sun Jun 7 20:51:05 CEST 2015
I think this is related to the difficulty I wrote about last week.
This example is with last night's development build and uses only
R-core provided code.
I don't understand this Error message
Error in get(f, envir = code_env) : object '[<-.ts' not found
when I can display the object stats:::`[<-.ts`
I am hoping this is related to these messages that I receive when I do
R CMD check on my package:
* checking replacement functions ... WARNING
Error in validObject(.Object) :
invalid class "ObjectsWithPackage" object: superclass "atomicVector"
not defined in the environment of the object's class
Calls: <Anonymous> ... metaNameUndo -> new -> initialize -> initialize
-> validObject
Execution halted
The argument of a replacement function which corresponds to the right
hand side must be named 'value'.
Rich
R Under development (unstable) (2015-06-06 r68484) -- "Unsuffered Consequences"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> > options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient', show.error.locations=TRUE)
>
> search()
[1] ".GlobalEnv" "ESSR" "package:stats"
[4] "package:graphics" "package:grDevices" "package:utils"
[7] "package:datasets" "package:methods" "Autoloads"
[10] "package:base"
> library(stats)
> for (i in searchpaths()) {cat(i,"\n");try(tools::checkReplaceFuns(dir=i))}
.GlobalEnv
Error in tools::checkReplaceFuns(dir = i) :
directory '.GlobalEnv' does not exist
ESSR
Error in tools::checkReplaceFuns(dir = i) :
directory 'ESSR' does not exist
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/stats
Error in get(f, envir = code_env) : object '[<-.ts' not found
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/graphics
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/grDevices
Error in get(f, envir = code_env) : object '[<-.raster' not found
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/utils
Error in get(f, envir = code_env) : object '$<-.bibentry' not found
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/datasets
Error in tools::checkReplaceFuns(dir = i) :
directory '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/datasets'
does not contain R code
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/methods
Autoloads
Error in tools::checkReplaceFuns(dir = i) :
directory 'Autoloads' does not exist
/Library/Frameworks/R.framework/Resources/library/base
> search()
[1] ".GlobalEnv" "ESSR" "package:stats"
[4] "package:graphics" "package:grDevices" "package:utils"
[7] "package:datasets" "package:methods" "Autoloads"
[10] "package:base"
> stats:::`[<-.ts`
function (x, i, j, value)
{
y <- NextMethod("[<-")
if (NROW(y) != NROW(x))
stop("only replacement of elements is allowed")
y
}
<bytecode: 0x7f9d349fe830>
<environment: namespace:stats>
>
More information about the R-package-devel
mailing list