Check class of landscape
Closed this issue · 7 comments
I got the following mail:
[...]
Apparently your package no longer works correctly when
class(matrix(...)) gives a vector of length two and conditions of length
greater than one in 'if' or 'while' give an error: 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.
[...]
We cannot use class(landscape) != "matrix"
any more (https://developer.r-project.org/Blog/public/2019/11/09/when-you-think-class.-think-again/index.html).
I will push in a few minutes
We probably should use !inherits(landscape, "matrix")
I went for !is(landscape, "matrix")
which should be the same.
I'm just running some checks at the moment if everything runs smoothly.
Fixed: 3dcc29c