FAQ

On Fri, May 03, 2002 at 06:14:23PM +1000, John Aitchison wrote:

Is this a bug or a feature?
seq(0:4) # colon
[1] 1 2 3 4 5
0:4
[1] 0 1 2 3 4
seq(0,4)
[1] 0 1 2 3 4

I am aware that the first usage is incorrect, but I was surprised that
I did not get any sort of syntax error
The first usage is not 'incorrect'. help(seq) says :
------------
Usage:

from:to
seq(from, to)
seq(from, to, by=)
seq(from, to, length=)
seq(along)
------------

It returns a sequence of indices 'along' the given vector...




Hopin' it helps,



L.





--------------------------------------------------------------
Laurent Gautier CBS, Building 208, DTU
PhD. Student D-2800 Lyngby,Denmark
tel: +45 45 25 24 85 http://www.cbs.dtu.dk/laurent
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 12 of 13 | next ›
Discussion Overview
groupr-help @
categoriesr
postedSep 3, '01 at 7:10p
activeMay 3, '02 at 11:10a
posts13
users12
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase