Skip to content
Prev 25289 / 63424 Next

missing IntegerFromString()

On Thu, 7 Jun 2007, Aniko Szabo wrote:

            
if(length(cl) > 0)
 	    minY = INTEGER(coerceVector(cl, INTSXP))[0];
 	else minY = NA_INTEGER;

You are assuming that there is at least one dimname, and your code needs 
more careful checks.  cl could be NULL and it could be of length 0.  If 
not NULL it is (currently) guaranteed to be a STRSXP.

In future versions of R 'minY = asInteger(cl)' will be all that is needed.


[Private message posted to the list deleted: you are not allowed to do 
that, as the posting guide points out.  It is a breach of copyright law.]