[R] Bug report: override stopifnot() ?

William Dunlap wdunlap at tibco.com
Mon Mar 12 17:30:59 CET 2018


Why don't you use
   stopifnot( all(m1 == m2) )
?

Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Mon, Mar 12, 2018 at 8:15 AM, Stepan Kasal <kasal at ucw.cz> wrote:

> Hello,
> I stumbled over a problem:
>    stopifnot(m1 == m2)
>
> It works with vector or matrix, but does not work for classes from Matrix
> package.
>
> In the source of stopifnot(), there is all(m1 == m2) that would just work,
> but there is also is.logical(m1 == m2) that id FALSE.
>
> Would it be possible if Matrix package redefined stopifnot() ?
>
> (If there is a bug tracking database for package Matrix, I would be happy
> to insert this report there.)
>
> Thank you very much for the package,
>     Stepan Kasal
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list