Comments (3)
It might be equivalent, but I think current best practice is to use inherits
instead, for example:
> x <- matrix(1:9, 3, 3)
> inherits(x, "matrix")
[1] TRUE
The change from using only 'matrix'
for a 'matrix' to also giving it class
'array'
was telegraphed a while ago. I think package authors received notice via email from CRAN... ah, yes, Dec 4th from Kurt H.:
Dear maintainer,
Please see the problems shown on
https://cran.r-project.org/web/checks/check_results_paleotree.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 setsR_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.
Best,
-k
Well, apparently it was telegraphed to those of us for whom it broke our packages on CRAN...
from disprity.
The R_CLASS_MATRIX_ARRAY changes for Rv4 were implemented in dispRity
1.4 (https://github.com/TGuillerme/dispRity/blob/master/NEWS.md) that I think was running fine for Rv3 users (i.e. I wasn't aware of any issue). The newest version (dispRity
1.5) now has more checks for the class of the input for the new functionalities that were the cause of version change.
I've taken the change from @josephwb credited in the NEWS.md
and reverted the version number to Rv1.6.
This is now deployed on the master
and release
branches so that
devtools::install_github("TGuillerme/dispRity", ref = "release")
or
devtools::install_github("TGuillerme/dispRity")
Should work for older R versions (@josephwb, please let me know if it's the case so that I can close this issue).
from disprity.
Installed and running. Thanks.
from disprity.
Related Issues (20)
- Towards 1.5
- fail to remove zero-length branches, HOT 1
- Speed improvements
- multidimensional `bhatt.coeff`
- Feature requests for multi.ace HOT 2
- `treats` interface
- Allow `plot.dispRiy` to plot single disparity values HOT 1
- Update distances methods to `vegdist` once
- Include `metric` in the `dispRity` object
- `clean.data` NA dropped rows HOT 1
- More complex rarefaction algorithms HOT 1
- Add `PAST` permutation tests.
- More tests!
- Expand node/tip probability structure HOT 1
- Improve `dispRity` speed
- Finish model.test implementation
- Add distance matrix conservation HOT 1
- version 1.4 update
- Add serial mode to metrics HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disprity.