Browse code

Accomodate for change to class(matrix()) in R 4.0

Hervé Pagès authored on 24/03/2020 07:29:35
Showing1 changed files

... ...
@@ -17,7 +17,9 @@
17 17
         return(.getSeedClasses(seed))
18 18
     }
19 19
     else {
20
-        class(seed)
20
+        # Pick the first element returned by class() (starting with R 4.0,
21
+        # 'class(matrix())' is 'c("matrix", "array")').
22
+        class(seed)[[1L]]
21 23
     }
22 24
 }
23 25