Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix R 4.0.0 compatibility problem #12

Closed
ianmcook opened this issue Dec 4, 2019 · 1 comment
Closed

Fix R 4.0.0 compatibility problem #12

ianmcook opened this issue Dec 4, 2019 · 1 comment
Labels
bug

Comments

@ianmcook
Copy link
Owner

@ianmcook ianmcook commented Dec 4, 2019

On 2019-12-04, Kurt Hornik emailed the following:

Dear maintainer,

Please see the problems shown on https://cran.r-project.org/web/checks/check_results_wkb.html.

Specifically, see the problems shown for the r-devel Debian checks.

These can be reproduced by checking with --as-cran using current r-devel, which for now sets

R_CLASS_MATRIX_ARRAY=true

in the check environment, to the effect that

R> class(matrix(1 : 4, 2, 2))
[1] "matrix" "array"

(and no longer just "matrix" as before).

According to the R NEWS file,

For now only active when environment variable R_CLASS_MATRIX_ARRAY
is set to non-empty, but planned to be the new unconditional behavior
when R 4.0.0 is released:

matrix objects now also inherit from class "array", namely, e.g.,
class(diag(1)) is c("matrix", "array") which invalidates code
assuming that length(class(obj)) == 1, an incorrect assumption that
is less frequently fulfilled now.

S3 methods for "array", i.e., .array(), are now also
dispatched for matrix objects.

Apparently your package no longer works correctly when class(matrix(...)) gives a vector of length two: please fix as necessary.

See https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html for more information about correctly using class() in package code.

Please correct before 2019-12-18 to safely retain your package on CRAN.

@ianmcook ianmcook added the bug label Dec 5, 2019
@ianmcook
Copy link
Owner Author

@ianmcook ianmcook commented Dec 5, 2019

Fixed in 0cc7c87

@ianmcook ianmcook closed this Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.