[R] R error function (NOT erf)

Rolf Turner rolf.turner at xtra.co.nz
Thu Nov 17 08:41:36 CET 2011

On 17/11/11 18:54, Sachin Abeywardana wrote:
> 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")



         Rolf Turner

More information about the R-help mailing list