It occurs why start or stop could not be converted into integer of
length > 0 by using as.interger().

More presicely,
if( !isInteger(sa) || !isInteger(so) || k == 0 || l == 0 ) # c code
where sa is start, so is stop, k is length(start), l is length(stop)

For example:

substr("orz",character(0),0)
substr("orz",numeric(0),0)
substr("orz",logical(0),0)
substr("orz",integer(0),0)
substr("orz",NULL,0)

produce the error because of k==0


But there seems to be another case which I don't know.


On 1/25/07, Shubha Vishwanath Karanth <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> Do anybody know when and why the below error we get?
>
>
>
> Error in substr(x, as.integer(start), as.integer(stop)) :
>         invalid substring argument(s) in substr()
>
>
>
> Thanks in advance,
>
> Shubha
>
>
>       [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] 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.
>

______________________________________________
[email protected] 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