Skip to content
Prev 277676 / 398506 Next

R error function (NOT erf)

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