Closed RobinHankin closed 1 year ago
diff() should fail for a disord object but:
diff()
disord
> (a <- rdis()) A disord object with hash 4709b30137f7d8ac6460092e0979ed752ede37da and elements [1] 6 4 1 8 7 2 9 3 5 (in some order) > diff(a) [1] -2 -3 7 -1 -5 7 -6 2 attr(,"class") [1] "disord" attr(,"class")attr(,"package") [1] "disordR" >
Easy to fix:
> setMethod("diff","disord",function(x){stop("cannot take the diff() of a disord object")}) > diff(rdis()) Error in .local(x, ...) : cannot take the diff() of a disord object
diff()
should fail for adisord
object but: