On 4/21/2006 9:26 PM, Vivek Satsangi wrote:
> (Sorry about the last email which was incomplete. I hit 'send' accidentally).
> 
> I looked at ?seq. One of the forms given under "Usage" is seq(from).
> This would be the form used if seq is called with only one argument.
> However, this should actually say seq(to). For example,
>> seq(1)
> [1] 1
>> seq(3)
> [1] 1 2 3

Try this:

 > debug(seq.default)
 > seq(3)

You'll then drop into the browser at the start of executing the 
seq.default function.  You can print the value of "to" and of "from", 
and you'll see this:

Browse[1]> to
[1] 1
Browse[1]> from
[1] 3

So the documentation is correct, even if the usage in this case is the 
reverse of English usage.

(You'll quickly want "undebug(seq.default)" if you don't want to spend a 
lot of time in the debugger; seq() is a pretty commonly used function!)

Duncan Murdoch

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to