From by.hook.or at gmail.com  Mon Jun 29 19:03:52 2015
From: by.hook.or at gmail.com (franknarf)
Date: Mon, 29 Jun 2015 10:03:52 -0700 (PDT)
Subject: [Rd] shouldn't seq(my_int_vector,
	length.out=y) be an integer vector?
Message-ID: <1435597432466-4709180.post@n4.nabble.com>

The class of seq(1L,length.out=6L) is numeric, which is not what I expect.
seq(1L,6L) gives an integer vector; and even seq(1,6) does, so the
departure/inconsistency when length.out is used doesn't seem desirable.

In the code for seq.default, I see

length.out <- ceiling(length.out) 

and I'd suggest wrapping this in as.integer, since apparently ceiling
doesn't return an integer. (I'm sure there's some reason for that.)

--Frank



--
View this message in context: http://r.789695.n4.nabble.com/shouldn-t-seq-my-int-vector-length-out-y-be-an-integer-vector-tp4709180.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] shouldn't seq(my_int_vector, length.out=y) be an integer vector?
franknarf