[R] seq_len

From: Joe W. Byers <ecjbosu_at_aol.com>
Date: Sat, 08 Dec 2007 00:02:16 -0600


In a post on R-devel, Prof Ripley add the following comment
| > BTW, 1:dim(names)[1] is dangerous: it could be 1:0. That was the
| > motivation for seq_len.

I use the dim(names)[1] and dim(x)[2] along with length(x) with varying levels of frustration depending on the object which I am trying to get the dimensions. I found the reference to seq_len interesting since it is a function that I have never seen (probably just missed it reading the docs).

I was hoping someone could expand on the benefits of seq_len.

Happy Holidays
Joe



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. Received on Sat 08 Dec 2007 - 06:11:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 08 Dec 2007 - 15:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.