An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111123/c7841851/attachment.pl>
bizarre seq() behavior?
4 messages · Czerminski, Ryszard, Rainer Schuermann, Barry Rowlingson
You have a dot (not a comma) after 8:
seq(2,8.1,length.out=3)
^ Rgds, Rainer
On Wednesday 23 November 2011 06:59:12 Czerminski, Ryszard wrote:
Is there any rational explanation for the bizarre seq() behavior below?
seq(2,8.1, lenght.out=3)
[1] 2 3 4 5 6 7 8
help(seq) seq(2,8,length.out=3)
[1] 2 5 8
seq(2,8.1,length.out=3)
[1] 2.00 5.05 8.10
Except maybe that it is early in the morning :)
Best regards,
Ryszard
Ryszard Czerminski
AstraZeneca Pharmaceuticals LP
35 Gatehouse Drive
Waltham, MA 02451
USA
781-839-4304
ryszard.czerminski at astrazeneca.com
-------------------------------------------------------------------------
- Confidentiality Notice: This message is private and may
...{{dropped:11}}
______________________________________________ R-help at r-project.org 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.
...and a spelling mistake in your first line (lenght instead of length)...
On Wednesday 23 November 2011 06:59:12 Czerminski, Ryszard wrote:
Is there any rational explanation for the bizarre seq() behavior below?
seq(2,8.1, lenght.out=3)
[1] 2 3 4 5 6 7 8
help(seq) seq(2,8,length.out=3)
[1] 2 5 8
seq(2,8.1,length.out=3)
[1] 2.00 5.05 8.10
Except maybe that it is early in the morning :)
Best regards,
Ryszard
Ryszard Czerminski
AstraZeneca Pharmaceuticals LP
35 Gatehouse Drive
Waltham, MA 02451
USA
781-839-4304
ryszard.czerminski at astrazeneca.com
-------------------------------------------------------------------------
- Confidentiality Notice: This message is private and may
...{{dropped:11}}
______________________________________________ R-help at r-project.org 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.
On Wed, Nov 23, 2011 at 12:17 PM, Rainer Schuermann
<rainer.schuermann at gmx.net> wrote:
You have a dot (not a comma) after 8:
seq(2,8.1,length.out=3)
On Wednesday 23 November 2011 06:59:12 Czerminski, Ryszard wrote:
Is there any rational explanation for the bizarre seq() behavior below?
seq(2,8.1, lenght.out=3)
[1] 2 3 4 5 6 7 8
I think its the bizarre spelling of 'lenght.out'. Either spell it right or make it a unique abbreviation - len, leng, or lengt will work, but as soon as you mess up, R will go 'I have no idea what that is, have a default':
seq(2,8.1, len=3)
[1] 2.00 5.05 8.10
seq(2,8.1, leng=3)
[1] 2.00 5.05 8.10
seq(2,8.1, lengh=3)
[1] 2 3 4 5 6 7 8
Barry