You've found an interesting corner of Circle 1
of 'The R Inferno'.
http://www.burns-stat.com/documents/books/the-r-inferno/
The issue is that your 'n' in the final case is
slightly less than 11. So:
n
[1] 11
as.integer(n)
[1] 10
1:n
[1] 1 2 3 4 5 6 7 8 9 10 11
The mystery to me
Hi, Can anyone explain what is going on...!? For a vector
x=seq(min,max,0.01), when generating sub-vector a based on a starting
value st, things go as expected as long as st is not too close to the
beginning of x. For example, if x starts at -5 and increments by 0.01,
whenever I try to generate
Sigh. Google couldn't help you?
Try FAQ 7.31 and then use non-fractions to generate sequences... scale as
desired. This is not unique to R.
---
Jeff NewmillerThe . . Go Live...
3 matches
Mail list logo