On Aug 20, 2013, at 14:41, ivo welch <ivo.we...@anderson.ucla.edu> wrote:
> A second enhancement would be a "smart string", which knows that > everything inside {{...}} should be evaluated. I think one the HTML templating libraries (whisker or mustache or some such) provides something not unlike this. Perhaps take a look. > > stopifnot( is.matrix(m), "m is not a matrix, but a {{class(m)}}" ) > > > my own programming variant looks even nicer, > > is.matrix(m) %or% "m is not a matrix but a {{class(m)}}" > > but requesting base R to add the %and% and %or% (or, better yet, 'and' > and 'or') operators by default would be pushing my luck. Does %or% throw an error or is this wrapped in something else? The former seems rather perl-ish, but the latter might suggest you look into the || and && operators if you only know their single counterparts. Michael > > /iaw > > > ---- > Ivo Welch (ivo.we...@gmail.com) > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel