> first, I think it would be more useful if it had an optional character
> string, so users could write
>
>   stopifnot( is.matrix(m), "m is not a matrix" )
>

Another option is to just generate better error messages automatically, e.g.:

> library(assertthat)
> x <- 1:10
> assert_that(is.matrix(x))
Error: x is not a matrix

Hadley

-- 
Chief Scientist, RStudio
http://had.co.nz/

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to