I asked:> In this discussion of seq(), can anyone explain to > me _why_ seq(to=n) and seq(length=3) have different > types?Martin Maechler <maechler@stat.math.ethz.ch> replied: well, the explantion isn't hard: look at seq.default :-) That's the "efficient cause", I was after the "final cause". That is, I wasn't asking "what is it about the system which MAKES this happen" but "why does anyone WANT this to happen"? now if that really makes your *life* simpler, what does that tell us about your life ;-) :-) It tells you I am revising someone else's e-book about S to describe R. The cleaner R is, the easier that part of my life gets. In the future, we really might want to have a new type, some "long integer" or "index" which would be used both in R and C's R-API for indexing into large objects where 32-bit integers overflow. It would be useful needed now for large file support and for Java interfacing. I assume, we will keep the R "integer" == C "int" == 32-bit int forever, but need something with more bits rather sooner than later. But in any, case by then, some things might have to change in R (and C's R-API) storage type of indexing. seq: from, to, by, length[.out], along[.with] I'm about to fix this (documentation, not code). Please don't. There's a lot of text out there: tutorials, textbooks, S on-inline documentation, &c which states over and over again that the arguments are 'along' and 'with'. Change the documentation, and people will start writing length.out, and will that port to S-Plus? (Serious question: I don't know.)
"Richard A. O'Keefe" <ok@cs.otago.ac.nz> writes:> seq: from, to, by, length[.out], along[.with] > > I'm about to fix this (documentation, not code). > > Please don't. There's a lot of text out there: tutorials, textbooks, > S on-inline documentation, &c which states over and over again that > the arguments are 'along' and 'with'. Change the documentation, and > people will start writing length.out, and will that port to S-Plus? > (Serious question: I don't know.)It will. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
>>>>> "RichOK" == Richard A O'Keefe <ok@cs.otago.ac.nz> >>>>> on Mon, 13 Dec 2004 10:56:48 +1300 (NZDT) writes:RichOK> I asked: >> In this discussion of seq(), can anyone explain to me >> _why_ seq(to=n) and seq(length=3) have different types? RichOK> Martin Maechler <maechler@stat.math.ethz.ch> RichOK> replied: well, the explantion isn't hard: look at RichOK> seq.default :-) RichOK> That's the "efficient cause", I was after the "final RichOK> cause". That is, I wasn't asking "what is it about RichOK> the system which MAKES this happen" but "why does RichOK> anyone WANT this to happen"? sure, I did understand you quite well -- I was trying to joke and used the " :-) " to point the joking .. MM> now if that really makes your *life* simpler, MM> what does that tell us about your life ;-) :-) { even more " :-) " !! } RichOK> It tells you I am revising someone else's e-book RichOK> about S to describe R. The cleaner R is, the easier RichOK> that part of my life gets. of course, and actually I do agree for my life too, since as you may believe, parts of my life *are* influenced by R. Apologize for my unsuccessful attempts to joking.. RichOK> seq: from, to, by, length[.out], along[.with] MM> I'm about to fix this (documentation, not code). RichOK> Please don't. There's a lot of text out there: RichOK> tutorials, textbooks, S on-inline documentation, &c RichOK> which states over and over again that the arguments RichOK> are 'along' and 'with'. you meant 'along' and 'length' yes. And everyone can continue to use the abbreviated form as I'm sure nobody will introduce a 'seq' method that uses *multiple* argument names starting with "along" or "length" (such that the partial argument name matching could become a problem). RichOK> Change the documentation, and people will start RichOK> writing length.out, and will that port to S-Plus? RichOK> (Serious question: I don't know.) yes, as Peter has confirmed already. Seriously, I think we wouldn't even have started using the ugly ".with" or ".out" appendices, wouldn't it have been for S-plus compatibility {and Peter has also given the explanation why there *had* been a good reason for these appendices in the past}. Martin