From mick.jordan at oracle.com  Tue Jan  3 16:57:15 2017
From: mick.jordan at oracle.com (Mick Jordan)
Date: Tue, 3 Jan 2017 07:57:15 -0800
Subject: [Rd] seq.int/seq.default
Message-ID: <03f5806e-6656-233a-c7f0-ebe25f3160c8@oracle.com>

This is a message for someone familiar with the implementation.

Superficially the R code for seq.default and the C code for seq.int 
appear to be semantically very similar. My question is whether, in fact, 
it is intended that behave identically for all inputs. I have found two 
cases so far where they differ, first that seq.int will coerce a 
character string to a real (via Rf_asReal) whereas seq.default appears 
to coerce it to NA and then throws an error:

 > seq.default("2", "5")
Error in seq.default("2", "5") : 'from' cannot be NA, NaN or infinite
 > seq.int("2", "5")
[1] 2 3 4 5
 >

and second, that the error messages for non-numeric arguments differ:

seq.default(to=quote(b), by=2)
Error in is.finite(to) : default method not implemented for type 'symbol'

seq.int(to=quote(b), by=2)
Error in seq.int(to = quote(b), by = 2) :
   'to' cannot be NA, NaN or infinite


Please reply off list.

Thanks
Mick Jordan



[Rd] seq.int/seq.default
Mick Jordan