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")

    ?stop

    cheers,

        Rolf Turner

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to