[R] R error function (NOT erf)

Sachin Abeywardana sachin.abeywardana at gmail.com
Thu Nov 17 06:54:51 CET 2011


Hi all,

I was wondering if it was possible to get R to throw an error if a 
certain condition was reached. For example:

if dim(A)[2]<=1
     error("Need a matrix not a vector")

thanks,
Sachin



More information about the R-help mailing list