diff -Nru r-cran-r.methodss3-1.8.1/debian/changelog r-cran-r.methodss3-1.8.2/debian/changelog --- r-cran-r.methodss3-1.8.1/debian/changelog 2020-09-04 08:51:20.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/debian/changelog 2022-06-24 06:44:19.000000000 +0000 @@ -1,3 +1,11 @@ +r-cran-r.methodss3 (1.8.2-1) unstable; urgency=medium + + * New upstream version + * Standards-Version: 4.6.1 (routine-update) + * Reorder sequence of d/control fields by cme (routine-update) + + -- Andreas Tille Fri, 24 Jun 2022 08:44:19 +0200 + r-cran-r.methodss3 (1.8.1-1) unstable; urgency=medium * New upstream version diff -Nru r-cran-r.methodss3-1.8.1/debian/control r-cran-r.methodss3-1.8.2/debian/control --- r-cran-r.methodss3-1.8.1/debian/control 2020-09-04 08:51:20.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/debian/control 2022-06-24 06:44:19.000000000 +0000 @@ -1,17 +1,17 @@ Source: r-cran-r.methodss3 -Maintainer: Debian R Packages Maintainers -Uploaders: Andreas Tille Section: gnu-r -Testsuite: autopkgtest-pkg-r Priority: optional -Build-Depends: debhelper-compat (= 13), - dh-r, - r-base-dev -Standards-Version: 4.5.0 +Maintainer: Debian R Packages Maintainers +Uploaders: Andreas Tille Vcs-Browser: https://salsa.debian.org/r-pkg-team/r-cran-r.methodss3 Vcs-Git: https://salsa.debian.org/r-pkg-team/r-cran-r.methodss3.git Homepage: https://cran.r-project.org/package=R.methodsS3 +Standards-Version: 4.6.1 Rules-Requires-Root: no +Build-Depends: debhelper-compat (= 13), + dh-r, + r-base-dev +Testsuite: autopkgtest-pkg-r Package: r-cran-r.methodss3 Architecture: all diff -Nru r-cran-r.methodss3-1.8.1/DESCRIPTION r-cran-r.methodss3-1.8.2/DESCRIPTION --- r-cran-r.methodss3-1.8.1/DESCRIPTION 2020-08-26 16:20:06.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/DESCRIPTION 2022-06-13 22:00:14.000000000 +0000 @@ -1,5 +1,5 @@ Package: R.methodsS3 -Version: 1.8.1 +Version: 1.8.2 Depends: R (>= 2.13.0) Imports: utils Suggests: codetools @@ -14,6 +14,6 @@ URL: https://github.com/HenrikBengtsson/R.methodsS3 BugReports: https://github.com/HenrikBengtsson/R.methodsS3/issues NeedsCompilation: no -Packaged: 2020-08-24 14:42:23 UTC; hb +Packaged: 2022-06-13 18:23:35 UTC; hb Repository: CRAN -Date/Publication: 2020-08-26 16:20:06 UTC +Date/Publication: 2022-06-13 22:00:14 UTC diff -Nru r-cran-r.methodss3-1.8.1/man/R.methodsS3-package.Rd r-cran-r.methodss3-1.8.2/man/R.methodsS3-package.Rd --- r-cran-r.methodss3-1.8.1/man/R.methodsS3-package.Rd 2020-08-24 14:41:42.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/man/R.methodsS3-package.Rd 2022-06-13 15:31:03.000000000 +0000 @@ -16,8 +16,8 @@ \description{ Methods that simplify the setup of S3 generic functions and S3 methods. Major effort has been made in making definition of methods as simple as possible with a minimum of maintenance for package developers. For example, generic functions are created automatically, if missing, and naming conflict are automatically solved, if possible. The method setMethodS3() is a good start for those who in the future may want to migrate to S4. This is a cross-platform package implemented in pure R that generates standard S3 methods. - This contents of this package was extracted from the - \pkg{R.oo} package [1]. + This contents of this package originates from the + \bold{R.oo} package [1]. } \section{Installation and updates}{ @@ -54,7 +54,6 @@ Statistical Computing (DSC 2003), ISSN 1609-395X, Hornik, K.; Leisch, F. & Zeileis, A. (ed.), 2003 } -\emph{} } diff -Nru r-cran-r.methodss3-1.8.1/man/setMethodS3.Rd r-cran-r.methodss3-1.8.2/man/setMethodS3.Rd --- r-cran-r.methodss3-1.8.1/man/setMethodS3.Rd 2020-08-24 14:41:42.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/man/setMethodS3.Rd 2022-06-13 15:31:03.000000000 +0000 @@ -49,8 +49,9 @@ \item{deprecated}{If \code{\link[base:logical]{TRUE}} this method is defined to be deprecated, otherwise not. Currently this has no effect expect as an indicator.} \item{envir}{The environment for where this method should be stored.} - \item{overwrite}{If \code{\link[base:logical]{TRUE}} an already existing method with the same - name (and of the same class) will be overwritten, otherwise not.} + \item{overwrite}{If \code{\link[base:logical]{TRUE}} an already existing generic function and an + already existing method with the same name (and of the same class) + will be overwritten, otherwise not.} \item{conflict}{If a method already exists with the same name (and of the same class), different actions can be taken. If \code{"error"}, an exception will be thrown and the method will not be created. diff -Nru r-cran-r.methodss3-1.8.1/man/throw.Rd r-cran-r.methodss3-1.8.2/man/throw.Rd --- r-cran-r.methodss3-1.8.1/man/throw.Rd 2020-08-24 14:41:42.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/man/throw.Rd 2022-06-13 15:31:03.000000000 +0000 @@ -18,10 +18,13 @@ Note that \code{throw()} can be defined for specific classes, which can then be caught (or not) using \code{\link[base:conditions]{tryCatch}}(). - \emph{This default function will be overridden by ditto in the \pkg{R.oo} - package, if that is loaded. The latter \code{\link[R.oo]{throw}} implementation + \emph{This default function will be overridden by ditto in the \bold{R.oo} + package, if that is loaded. The latter \code{R.oo::throw()} implementation is fully backward compatible with this one, but the error object thrown - is of class \code{\link[R.oo]{Exception}}.} + is of class \code{R.oo::Exception}.} + + \emph{WARNING: This function is deprecated in favor of \code{R.oo::throw()}, + or alternatively, just \code{stop()}.} } \usage{ @@ -54,4 +57,5 @@ \author{Henrik Bengtsson} \keyword{error} +\keyword{internal} diff -Nru r-cran-r.methodss3-1.8.1/MD5 r-cran-r.methodss3-1.8.2/MD5 --- r-cran-r.methodss3-1.8.1/MD5 2020-08-26 16:20:06.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/MD5 2022-06-13 22:00:14.000000000 +0000 @@ -1,14 +1,14 @@ -378ab667af421b87f1ce178b1d71f219 *DESCRIPTION +966471e938ff0593e6b97238d5d13d5e *DESCRIPTION 5ba0f371553d70d18151e9da2bd50edc *NAMESPACE -ceb70b52e24fdb74a17814baf56b5c6b *NEWS -544d6e098c1f8f20a9c75e7063eecf4f *R/000.R +086956b09ea25af7739c4a38f088a6a0 *NEWS.md +8e57a35c304df1d3e43c214f865e3257 *R/000.R b6fedf6eec903c85f59d383d15983fc0 *R/001.R.KEYWORDS.R 51ecd8323217b75599a40978646b2407 *R/005.varArgs.R 1df04dc13e5ad8dbc137a07bad5a1af1 *R/006.fixVarArgs.R -2ec154beac75177376dd9c2778458acd *R/010.setGenericS3.R -a60f9ab55d6f4a518ee449db9184db20 *R/030.setMethodS3.R +b54b6152d5d455b6d4b19b90e88a630c *R/010.setGenericS3.R +cdd7cb1700f54b56410b52d9d648b708 *R/030.setMethodS3.R 8a1ef83fe9e11779f11a04d068e7918d *R/999.NonDocumentedObjects.R -760bda3a9fc83be2df7be8e06231e10c *R/999.package.R +ba6e8edb7bf5b13b013669b8d2d23be6 *R/999.package.R 76d19ef014a0702fe70d226f98d5fdf1 *R/findDispatchMethodsS3.R 40363fdcbf82aab8d2c5108792bd1735 *R/getDispatchMethodS3.R 6c847d1b632efb00d941a1eb23cbf6d7 *R/getGenericS3.R @@ -17,13 +17,13 @@ 1b00320bdebb59cb0d86228cc839d89d *R/makeNamespace.R 2dea65413ed2dc7c64c651d060b8420a *R/pkgStartupMessage.R e57c9ff235c9417f3e46431368ee4625 *R/rccValidators.R -670bbff94e5704528abd38280b983b18 *R/throw.default.R -ee9a7d3faa96202645ccd565f1a51549 *R/zzz.R +da2b5a662415b628f77dd1911995afbb *R/throw.default.R +bfb121dc087ecdd9014c72f4be1a8f00 *R/zzz.R 221a5cb641badf6e5da59455778861ca *inst/CITATION 5ca40d7ba68d1842ff37a487642361e5 *inst/WORDLIST e62840f5029923bb7fde68ff03c85ba7 *man/Non-documented_objects.Rd 1b3a605645f2bf15b72946858f67a3bb *man/R.KEYWORDS.Rd -4e0e780fddcd5a999d4ac9be4e415c27 *man/R.methodsS3-package.Rd +db64d608aed8d55dd26a5dace5cab546 *man/R.methodsS3-package.Rd 3b5bcb3544cfbf6faadca52e1ccc8c9d *man/findDispatchMethodsS3.Rd 48ee8839fd89e9512fdec95178ebf9bd *man/getDispatchMethodS3.Rd 47ca671f187d64cd06c73abfef5e20fe *man/getGenericS3.Rd @@ -32,8 +32,8 @@ 4390144243165827fa06fd5e9077109b *man/isGenericS4.Rd 1ec8c68e31afd08566ef46903a60e5d2 *man/pkgStartupMessage.Rd d0ad086d52e72c12787dc638dd019a5a *man/setGenericS3.Rd -830bb1b41ffb0d2fe6f208157381fa61 *man/setMethodS3.Rd -08f7aee8b35261e03de5cf4e245a405a *man/throw.Rd +e846120baebc61ce19fa1eb7511ced6c *man/setMethodS3.Rd +d18865149cd8dc51c8435b5fe661c3a5 *man/throw.Rd b24a7cd174fded033c7469ca5fe4f8b9 *tests/appendVarArgs.R 2afbc200a256afc37d33c7a6b0d75f74 *tests/attributes.R 0b0e7970b79540a0248a2005ea9f0866 *tests/findDispatchMethodsS3.R diff -Nru r-cran-r.methodss3-1.8.1/NEWS r-cran-r.methodss3-1.8.2/NEWS --- r-cran-r.methodss3-1.8.1/NEWS 2020-08-24 14:41:28.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/NEWS 1970-01-01 00:00:00.000000000 +0000 @@ -1,300 +0,0 @@ -Package: R.methodsS3 -==================== - -Version: 1.8.1 [2020-08-24] - - * BUG FIXES: R.methodsS3 would produce "Warning: partial match of 'Date' to - 'Date/Publication'" when attached if options(warnPartialMatchDollar=TRUE). - - -Version: 1.8.0 [2020-02-13] - -SIGNIFICANT CHANGES: - - * Now setGenericS3() produces an error if it can not turn an existing function - into a "default" function and create a new generic function. Previously, - it produced a warning. - -NEW FEATURES: - - * Now setGenericS3() sets the 'S3class' attribute on any "default" methods - it creates, if any. - - * Add internal function R.methodsS3:::makeNamespace(pkg) for producing - S3method() statements to be put in a package's NAMESPACE file. - -CODE QUALITY: - - * Now formally suggesting 'codetools'. - -BUG FIXES: - - * R.methodsS3::setMethodS3() could produce 'Error in appendVarArgs( - ...R.oo.definition) : could not find function "appendVarArgs"' if the - R.methodsS3 package is not attached. - - * setMethodS3() and setGenericS3() failed to detect names 'NA_real_' etc. - as R keywords due to an 11 year old bug. - -DEPRECATED & DEFUNCT: - - * R.methodsS3::throw() is deprecated. Use base::stop(), or R.oo::throw(), - instead. - - -Version: 1.7.1 [2016-02-15] - -SIGNIFICANT CHANGES: - - * CLEANUP: Package now requires R (>= 2.13.0) (April 2011). If really needed - on earlier version of R, it only takes a minor tweak, but I won't do that - unless really really needed. - -CODE QUALITY: - - * Explicit namespace imports also from 'utils' package. - - -Version: 1.7.0 [2015-02-19] - -NEW FEATURES: - - * CONSISTENCY: Now isGenericS4() returns FALSE for non-existing functions, - just as isGenericS3() does. - -CODE QUALITY: - - * ROBUSTNESS: Added several package tests. - -BUG FIXES: - - * isGenericS3() on a function gave error "object 'Math' of mode 'function' - was not found" when the 'methods' package was not loaded, e.g. - Rscript -e "R.methodsS3::isGenericS3(function(...) NULL)". - - * findDispatchMethodsS3() could in rare cases return an extra set of false - functions in R (< 3.1.2). This was due to a bug in R (< 3.1.2) where the - output of getAnywhere() contained garbage results, e.g. - getAnywhere(".Options")$objs. For backward compatibility, - findDispatchMethodsS3() now detects this case and works around it. This - bug was only detected after adding an explicit package test for - findDispatchMethodsS3(). - - -Version: 1.6.2 [2014-05-04] - -CODE QUALITY: - - * CLEANUP: Internal directory restructuring. - - -Version: 1.6.1 [2014-01-04] - -CODE QUALITY: - - * CLEANUP: Dropped obsolete argument 'ellipsesOnly' from setGenericS3(). - It was not used. Thanks Antonio Piccolboni for reporting on this. - - -Version: 1.6.0 [2013-11-12] - -BUG FIXES: - - * Generic function created by setGenericS3("foo<-") would not have a last - argument name 'value', which 'R CMD check' complains about. - - -Version: 1.5.3 [2013-11-05] - -NEW FEATURES: - - * ROBUSTNESS: Now setMethodS3(name, class, ...) and setGenericS3(name, ...) - assert that arguments 'name' and 'class' are non-empty. - - -Version: 1.5.2 [2013-10-06] - -NEW FEATURES: - - * BETA: Added an in-official option to make setGenericS3() and setMethodsS3() - look for existing (generic) functions also in imported namespaces. This - will eventually become the default. - - * ROBUSTNESS: Now isGenericS3() also compares to known generic functions in - the 'base' package. It also does a better job on checking whether the - function calls UseMethod() or not. - - * Added argument 'inherits' to getGenericS3(). - - * The above improvement of isGenericS3() means that setGenericS3() does a - better job to decided whether a generic function should be created or not, - which in turn means 'createGeneric = FALSE' is needed much less in - setMethodS3(). - - -Version: 1.5.1 [2013-09-15] - -BUG FIXES: - - * Forgot to explicitly import capture.output() from 'utils' which could give - an error on function "capture.output" not available when setMethodS3() was - used to define a "replacement" function. This was only observed on the - R v3.0.1 release version but not with the more recent patched or devel - versions. In addition, two other 'utils' functions are now explicitly - imported. - - -Version: 1.5.0 [2013-08-29] - -NEW FEATURES: - - * Added pkgStartupMessage() which acknowledges library(..., quietly = TRUE). - - -Version: 1.4.5 [2013-08-23] - -CODE QUALITY: - - * CLEANUP: No longer utilizing ':::' for "self" (i.e. R.methodsS3) methods. - -DEPRECATED & DEFUNCT: - - * CLEANUP: Dropped deprecated inst/HOWTOSITE replaced by inst/CITATION. - - -Version: 1.4.4 [2013-05-19] - -CODE QUALITY: - - * CRAN POLICY: Now all Rd \usage{} lines are at most 90 characters long. - - -Version: 1.4.3 [2013-03-08] - -CODE QUALITY: - - * Added an Authors@R field to the DESCRIPTION. - - -Version: 1.4.2 [2012-06-22] - -NEW FEATURES: - - * Now setMethodS3(..., appendVarArgs = TRUE) ignores 'appendVarArgs' if - the method name is "==", "+", "-", "*", "/", "^", "%%", or "%/%", - (in addition to "$", "$<-", "[[", "[[<-", "[", "[<-"). It will also - ignore it if the name matches regular expressions "<-$" or "^%[^%]*%$". - The built in RCC validators were updated accordingly. - - -Version: 1.4.1 [2012-06-20] - -NEW FEATURES: - - * Added argument 'overwrite' to setGenericS3(). - - -Version: 1.4.0 [2012-04-20] - -NEW FEATURES: - - * Now setMethodS3() sets attribute "S3class" to the class. - - * Added argument 'export' to setMethodS3() and setGenericS3(), which sets - attribute "export" to the same value. - - -Version: 1.3.0 [2012-04-16] - -SIGNIFICANT CHANGES: - - * Now only generic funcions are exported, and not all of them. - - * Now all S3 methods are properly declared in NAMESPACE. - - -Version: 1.2.3 [2012-03-08] - -NEW FEATURES: - - * Now arguments '...' of setMethodS3() are passed to setGenericS3(). - - -Version: 1.2.2 [2011-11-17] - -DOCUMENTATION: - - * CLEANUP: Dropped example(getMethodS3), which was for setMethodS3(). - - -Version: 1.2.1 [2010-09-18] - -BUG FIXES: - - * isGenericS3(), isGenericS4(), getGenericS3() and getMethodS3() failed to - locate functions created in the global environment while there exist a - function with the same name in the 'base' package. The problem only affected - the above functions and nothing else and it did not exist prior to - R.methodsS3 v1.2.0 when the package did not yet have a namespace. Thanks - John Oleynick for reporting on this problem. - - * isGenericS3() and isGenericS4() did not support specifying the function by - name as a character string, despite it was documented to do so. Thanks - John Oleynick for reporting on this. - - -Version: 1.2.0 [2010-03-13] - -CODE QUALITY: - - * Added a NAMESPACE. - - -Version: 1.1.0 [2010-01-02] - -NEW FEATURES: - - * Added getDispatchMethodS3() and findDispatchMethodsS3(). - - -Version: 1.0.3 [2008-07-02] - -CODE QUALITY: - - * Renamed HISTORY file to NEWS. - - -Version: 1.0.2 [2008-05-08] - -NEW FEATURES: - - * Added getMethodS3() and getGenericS3(). - -BUG FIXES: - - * isGenericS3() and isGenericS4() gave an error if a function was passed. - - -Version: 1.0.1 [2008-03-06] - -DOCUMENTATION: - - * Added paper to citation("R.methodsS3"). - -BUG FIXES: - - * Regular expression pattern 'a-Z' is illegal on (at least) some locale, e.g. - 'C' (where 'A-z' works). The only way to specify the ASCII alphabet is to - list all characters explicitly, which we now do in all methods of the - package. See the r-devel thread "invalid regular expression '[a-Z]'" on - 2008-03-05 for details. - - -Version: 1.0.0 [2007-09-17] - -SIGNIFICANTLY CHANGES: - - * Created by extracting setMethodS3() and related methods from the R.oo - package. The purpose is to provide setMethodS3() without having to load - (the already lightweight) R.oo package. For previous history related to - the methods in this package, please see the history of the R.oo package. diff -Nru r-cran-r.methodss3-1.8.1/NEWS.md r-cran-r.methodss3-1.8.2/NEWS.md --- r-cran-r.methodss3-1.8.1/NEWS.md 1970-01-01 00:00:00.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/NEWS.md 2022-06-13 18:23:12.000000000 +0000 @@ -0,0 +1,322 @@ +# Version 1.8.2 [2022-06-13] + +## Deprecated & Defunct + + * Very old, deprecated argument `enforceRCC` for `setGenericS3()` and + `setMethodS3()` is now defunct in favor of argument `validators`. + + +# Version 1.8.1 [2020-08-24] + +## Bug Fixes + + * **R.methodsS3** would produce "Warning: partial match of 'Date' to + 'Date/Publication'" when attached if + `options(warnPartialMatchDollar = TRUE)`. + + +# Version 1.8.0 [2020-02-13] + +## Significant Changes + + * Now `setGenericS3()` produces an error if it can not turn an + existing function into a "default" function and create a new + generic function. Previously, it produced a warning. + +## New Features + + * Now `setGenericS3()` sets the `S3class` attribute on any "default" + methods it creates, if any. + + * Add internal function `R.methodsS3:::makeNamespace(pkg)` for + producing `S3method()` statements to be put in a package's + NAMESPACE file. + +## Code Quality + + * Now formally suggesting **codetools**. + +## Bug Fixes + + * `R.methodsS3::setMethodS3()` could produce 'Error in appendVarArgs( + ...R.oo.definition) : could not find function "appendVarArgs"' if + the **R.methodsS3** package is not attached. + + * `setMethodS3()` and `setGenericS3()` failed to detect names + `NA_real_`, etc. as R keywords due to an 11 year old bug. + +## Deprecated & Defunct + + * `R.methodsS3::throw()` is deprecated. Use `base::stop()`, or + `R.oo::throw()`, instead. + + +# Version 1.7.1 [2016-02-15] + +## Significant Changes + + * CLEANUP: Package now requires R (>= 2.13.0) (April 2011). If + really needed on earlier version of R, it only takes a minor tweak, + but I won't do that unless really really needed. + +## Code Quality + + * Explicit namespace imports also from **utils** package. + + +# Version 1.7.0 [2015-02-19] + +## New Features + + * CONSISTENCY: Now `isGenericS4()` returns FALSE for non-existing + functions, just as `isGenericS3()` does. + +## Code Quality + + * ROBUSTNESS: Added several package tests. + +## Bug Fixes + + * `isGenericS3()` on a function gave error "object 'Math' of mode + 'function' was not found" when the **methods** package was not + loaded, e.g. `Rscript -e "R.methodsS3::isGenericS3(function(...) + NULL)"`. + + * `findDispatchMethodsS3()` could in rare cases return an extra set + of false functions in R (< 3.1.2). This was due to a bug in R (< + 3.1.2) where the output of `getAnywhere()` contained garbage + results, e.g. `getAnywhere(".Options")$objs`. For backward + compatibility, `findDispatchMethodsS3()` now detects this case and + works around it. This bug was only detected after adding an + explicit package test for `findDispatchMethodsS3()`. + + +# Version 1.6.2 [2014-05-04] + +## Code Quality + + * CLEANUP: Internal directory restructuring. + + +# Version 1.6.1 [2014-01-04] + +## Code Quality + + * CLEANUP: Dropped obsolete argument `ellipsesOnly` from + `setGenericS3()`. It was not used. Thanks Antonio Piccolboni for + reporting on this. + + +# Version 1.6.0 [2013-11-12] + +## Bug Fixes + + * Generic function created by `setGenericS3("foo<-")` would not have + a last argument name `value`, which `R CMD check` complains about. + + +# Version 1.5.3 [2013-11-05] + +## New Features + + * ROBUSTNESS: Now `setMethodS3(name, class, ...)` and + `setGenericS3(name, ...)` assert that arguments `name` and `class` + are non-empty. + + +# Version 1.5.2 [2013-10-06] + +## New Features + + * BETA: Added an in-official option to make `setGenericS3()` and + `setMethodsS3()` look for existing (generic) functions also in + imported namespaces. This will eventually become the default. + + * ROBUSTNESS: Now `isGenericS3()` also compares to known generic + functions in the **base** package. It also does a better job on + checking whether the function calls `UseMethod()` or not. + + * Added argument 'inherits' to getGenericS3(). + + * The above improvement of `isGenericS3()` means that + `setGenericS3()` does a better job to decided whether a generic + function should be created or not, which in turn means + `createGeneric = FALSE` is needed much less in `setMethodS3()`. + + +# Version 1.5.1 [2013-09-15] + +## Bug Fixes + + * Forgot to explicitly import `capture.output()` from **utils** which + could give an error on 'function "capture.output" not available + when setMethodS3() was used to define a "replacement" function'. + This was only observed on the R v3.0.1 release version but not with + the more recent patched or devel versions. In addition, two other + **utils** functions are now explicitly imported. + + +# Version 1.5.0 [2013-08-29] + +## New Features + + * Added `pkgStartupMessage()` which acknowledges `library(..., + quietly = TRUE)`. + + +# Version 1.4.5 [2013-08-23] + +## Code Quality + + * CLEANUP: No longer utilizing `:::` for "self" + (i.e. **R.methodsS3**) methods. + +## Deprecated & Defunct + + * CLEANUP: Dropped deprecated inst/HOWTOSITE replaced by + inst/CITATION. + + +# Version 1.4.4 [2013-05-19] + +## Code Quality + + * CRAN POLICY: Now all Rd `\usage{}` lines are at most 90 characters + long. + + +# Version 1.4.3 [2013-03-08] + +## Code Quality + + * Added an `Authors@R` field to the DESCRIPTION. + + +# Version 1.4.2 [2012-06-22] + +## New Features + + * Now `setMethodS3(..., appendVarArgs = TRUE)` ignores + `appendVarArgs` if the method name is `"=="`, `"+"`, `"-"`, `"*"`, + `"/"`, `"^"`, `"%%"`, or `"%/%"`, (in addition to `"$"`, `"$<-"`, + `"[["`, `"[[<-"`, `"["`, `"[<-"`). It will also ignore it if the + name matches regular expressions `"<-$"` or `"^%[^%]*%$"`. The + built in RCC validators were updated accordingly. + + +# Version 1.4.1 [2012-06-20] + +## New Features + + * Added argument `overwrite` to `setGenericS3()`. + + +# Version 1.4.0 [2012-04-20] + +## New Features + + * Now `setMethodS3()` sets attribute `S3class` to the class. + + * Added argument `export` to `setMethodS3()` and `setGenericS3()`, + which sets attribute `export` to the same value. + + +# Version 1.3.0 [2012-04-16] + +## Significant Changes + + * Now only generic funcions are exported, and not all of them. + + * Now all S3 methods are properly declared in NAMESPACE. + + +# Version 1.2.3 [2012-03-08] + +## New Features + + * Now arguments `...` of `setMethodS3()` are passed to + `setGenericS3()`. + + +# Version 1.2.2 [2011-11-17] + +DOCUMENTATION: + + * CLEANUP: Dropped `example(getMethodS3)`, which was for + `setMethodS3()`. + + +# Version 1.2.1 [2010-09-18] + +## Bug Fixes + + * `isGenericS3()`, `isGenericS4()`, `getGenericS3()`, and + `getMethodS3()` failed to locate functions created in the global + environment while there exist a function with the same name in the + **base** package. The problem only affected the above functions and + nothing else and it did not exist prior to **R.methodsS3** v1.2.0 + when the package did not yet have a namespace. Thanks John + Oleynick for reporting on this problem. + + * `isGenericS3()` and `isGenericS4()` did not support specifying the + function by name as a character string, despite it was documented + to do so. Thanks John Oleynick for reporting on this. + + +# Version 1.2.0 [2010-03-13] + +## Code Quality + + * Added a NAMESPACE. + + +# Version 1.1.0 [2010-01-02] + +## New Features + + * Added `getDispatchMethodS3()` and `findDispatchMethodsS3()`. + + +# Version 1.0.3 [2008-07-02] + +## Code Quality + + * Renamed HISTORY file to NEWS. + + +# Version 1.0.2 [2008-05-08] + +## New Features + + * Added `getMethodS3()` and `getGenericS3()`. + +## Bug Fixes + + * `isGenericS3()` and `isGenericS4()` gave an error if a function was + passed. + + +# Version 1.0.1 [2008-03-06] + +DOCUMENTATION: + + * Added paper to `citation("R.methodsS3")`. + +## Bug Fixes + + * Regular expression pattern `a-Z` is illegal on (at least) some + locale, e.g. 'C' (where `A-z` works). The only way to specify the + ASCII alphabet is to list all characters explicitly, which we now + do in all methods of the package. See the r-devel thread "invalid + regular expression '[a-Z]'" on 2008-03-05 for details. + + +# Version 1.0.0 [2007-09-17] + +SIGNIFICANTLY CHANGES: + + * Created by extracting `setMethodS3()` and related methods from the + **R.oo** package. The purpose is to provide `setMethodS3()` + without having to load (the already lightweight) **R.oo** package. + For previous history related to the methods in this package, please + see the history of the **R.oo** package. diff -Nru r-cran-r.methodss3-1.8.1/R/000.R r-cran-r.methodss3-1.8.2/R/000.R --- r-cran-r.methodss3-1.8.1/R/000.R 2020-02-14 07:06:18.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/R/000.R 2021-08-09 09:57:31.000000000 +0000 @@ -48,16 +48,21 @@ inherits <- as.logical(inherits) stopifnot(length(inherits) == n) + if (!exists("environmentName", mode="function")) { + environmentName <- function(env) attr(env, "name") + } + fcn <- pkg <- NULL for (kk in seq_along(envir)) { env <- envir[[kk]] inh <- inherits[kk] if (exists(name, mode="function", envir=env, inherits=inh)) { fcn <- get(name, mode="function", envir=env, inherits=inh) - pkg <- attr(env, "name") + pkg <- environmentName(env) if (is.null(pkg)) { - pkg <- "base" + pkg <- "" if (identical(env, baseenv())) { + pkg <- "base" } else if (identical(env, globalenv())) { pkg <- "" } diff -Nru r-cran-r.methodss3-1.8.1/R/010.setGenericS3.R r-cran-r.methodss3-1.8.2/R/010.setGenericS3.R --- r-cran-r.methodss3-1.8.1/R/010.setGenericS3.R 2020-02-14 07:06:18.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/R/010.setGenericS3.R 2021-10-05 04:56:13.000000000 +0000 @@ -57,9 +57,7 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - args <- list(...) if (is.element("enforceRCC", names(args))) { - warning("Argument 'enforceRCC' of setGenericS3() has been replaced by argument 'validators'.") - # Turn off validators? - if (args$enforceRCC == FALSE) validators <- NULL + .Defunct(msg = "Argument 'enforceRCC' of setGenericS3() has been replaced by argument 'validators'.") } @@ -115,9 +113,12 @@ # 3. Check for preexisting functions with the same name # i) in the environment that we are saving to ('envir'), # ii) in the currently loading environment ('loadenv'), or - # iii) in the environments in the search path (search()). + # iii) (optional) in the environments in the search path. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - envirs <- c(envir, loadenv, lapply(search(), FUN=as.environment)) + envirs <- c(envir, loadenv) + if (getOption("R.methodsS3:useSearchPath", TRUE)) { + envirs <- c(envirs, lapply(search(), FUN=as.environment)) + } inherits <- rep(FALSE, times=length(envirs)) checkImports <- getOption("R.methodsS3:checkImports:setGenericS3", FALSE) if (checkImports) inherits[1:2] <- TRUE @@ -148,7 +149,7 @@ defaultPkg <- fcn$pkg if (defaultExists) { - msg <- paste("Could not create generic function. There is already a non-generic function named ", name, "() in package ", fcnPkg, " with the same name as an existing default function ", nameDefault, "() in ", defaultPkg, ".", sep = "") + msg <- paste("Could not create generic function. There is already a non-generic function named ", name, "() in ", sQuote(fcnPkg), " with the same name as an existing default function ", nameDefault, "() in ", sQuote(defaultPkg), ".", sep = "") action <- Sys.getenv("R_R_METHODSS3_SETGENERICS3_ONDEFAULTEXISTS", "error") action <- getOption("R.methodsS3.setGenericS3.onDefaultExists", action) if (identical(action, "error")) { diff -Nru r-cran-r.methodss3-1.8.1/R/030.setMethodS3.R r-cran-r.methodss3-1.8.2/R/030.setMethodS3.R --- r-cran-r.methodss3-1.8.1/R/030.setMethodS3.R 2020-02-14 07:06:18.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/R/030.setMethodS3.R 2021-10-05 04:57:26.000000000 +0000 @@ -34,8 +34,9 @@ # \item{deprecated}{If @TRUE this method is defined to be deprecated, # otherwise not. Currently this has no effect expect as an indicator.} # \item{envir}{The environment for where this method should be stored.} -# \item{overwrite}{If @TRUE an already existing method with the same -# name (and of the same class) will be overwritten, otherwise not.} +# \item{overwrite}{If @TRUE an already existing generic function and an +# already existing method with the same name (and of the same class) +# will be overwritten, otherwise not.} # \item{conflict}{If a method already exists with the same name (and of # the same class), different actions can be taken. If \code{"error"}, # an exception will be thrown and the method will not be created. @@ -89,9 +90,7 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - args <- list(...) if (is.element("enforceRCC", names(args))) { - warning("Argument 'enforceRCC' of setGenericS3() has been replaced by argument 'validators'.") - # Turn off validators? - if (!args$enforceRCC) validators <- NULL + .Defunct(msg = "Argument 'enforceRCC' of setMethodS3() has been replaced by argument 'validators'.") } @@ -187,9 +186,12 @@ # 3. Check for preexisting functions with the same name # i) in the environment that we are saving to ('envir'), # ii) in the currently loading environment ('loadenv'), or - # iii) in the environments in the search path (search()). + # iii) (optional) in the environments in the search path. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - envirs <- c(envir, loadenv, lapply(search(), FUN=as.environment)) + envirs <- c(envir, loadenv) + if (getOption("R.methodsS3:useSearchPath", TRUE)) { + envirs <- c(envirs, lapply(search(), FUN=as.environment)) + } inherits <- rep(FALSE, times=length(envirs)) checkImports <- getOption("R.methodsS3:checkImports:setGenericS3", FALSE) if (checkImports) inherits[1:2] <- TRUE diff -Nru r-cran-r.methodss3-1.8.1/R/999.package.R r-cran-r.methodss3-1.8.2/R/999.package.R --- r-cran-r.methodss3-1.8.1/R/999.package.R 2020-02-14 07:06:24.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/R/999.package.R 2021-11-11 21:36:27.000000000 +0000 @@ -3,8 +3,8 @@ # # \description{ # @eval "packageDescription('R.methodsS3')$Description" -# This contents of this package was extracted from the -# \pkg{R.oo} package [1]. +# This contents of this package originates from the +# \bold{R.oo} package [1]. # } # # \section{Installation and updates}{ diff -Nru r-cran-r.methodss3-1.8.1/R/throw.default.R r-cran-r.methodss3-1.8.2/R/throw.default.R --- r-cran-r.methodss3-1.8.1/R/throw.default.R 2020-02-14 07:06:18.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/R/throw.default.R 2022-06-13 15:30:41.000000000 +0000 @@ -9,10 +9,13 @@ # Note that \code{throw()} can be defined for specific classes, which can # then be caught (or not) using \code{\link[base:conditions]{tryCatch}}(). # -# \emph{This default function will be overridden by ditto in the \pkg{R.oo} -# package, if that is loaded. The latter @see "R.oo::throw" implementation +# \emph{This default function will be overridden by ditto in the \bold{R.oo} +# package, if that is loaded. The latter \code{R.oo::throw()} implementation # is fully backward compatible with this one, but the error object thrown -# is of class @see "R.oo::Exception".} +# is of class \code{R.oo::Exception}.} +# +# \emph{WARNING: This function is deprecated in favor of \code{R.oo::throw()}, +# or alternatively, just \code{stop()}.} # } # # @synopsis @@ -31,6 +34,7 @@ # @author # # \keyword{error} +# \keyword{internal} #*/########################################################################### setMethodS3("throw", "default", function(...) { .Deprecated(msg = "R.methodsS3::throw() is deprecated. Use base::stop() instead, or R.oo::throw().") diff -Nru r-cran-r.methodss3-1.8.1/R/zzz.R r-cran-r.methodss3-1.8.2/R/zzz.R --- r-cran-r.methodss3-1.8.1/R/zzz.R 2020-07-09 18:24:39.000000000 +0000 +++ r-cran-r.methodss3-1.8.2/R/zzz.R 2021-08-09 09:45:18.000000000 +0000 @@ -1,4 +1,13 @@ ## covr: skip=all +.onLoad <- function(libname, pkgname) { + value <- getOption("R.methodsS3:useSearchPath", NULL) + if (is.null(value)) { + value <- Sys.getenv("R_R_METHODSS3_USE_SEARCH_PATH", "TRUE") + value <- isTRUE(as.logical(value)) + options("R.methodsS3:useSearchPath" = value) + } +} + .onAttach <- function(libname, pkgname) { pd <- utils::packageDescription(pkgname)