s-news
[Top] [All Lists]

Krause/Olsen 2nd Edition error

To: s-news@wubios.wustl.edu
Subject: Krause/Olsen 2nd Edition error
From: Marc Feldesman <feldesmanm@pdx.edu>
Date: Wed, 06 Dec 2000 09:33:09 -0800
I've just been going through the Krause and Olsen book - Basics of S and S-Plus - preparing some lecture material. K & O discuss the "seq" command and give an example that is clearly incorrect:

seq(0, 1, 0.03, length=15)

Running this in either S-Plus 2000 (rel 3) or in R (1.1.1) results in an error "...too many arguments", which arises because the "by" variable trumps the length variable here. I'd write this off as a typo but the rest of the discussion of seq leads me to believe that they've missed the mutual exclusivity of by & length in the seq function.

Are by and length really mutually exclusive in seq (I've run quite a few examples and get the same error every time even when the by variable should lead to the coded "length"?







=====================
Dr. Marc R. Feldesman
Professor and Chairman
Anthropology Department
Portland State University
1721 SW Broadway
Portland, Oregon 97201
email:  feldesmanm@pdx.edu
phone:  503-725-3081
fax:    503-725-3905
http://web.pdx.edu/~h1mf
PGP Key Available On Request
======================

"Anyway, no drug, not even alcohol, causes the fundamental ills of society.
If we're looking for the source of our troubles, we shouldn't test people
for drugs, we should test them for stupidity, ignorance, greed and love of
power."   P.J. O'Rourke

Powered by Optiplochoerus and Windows 2000 (scary isn't it?)


<Prev in Thread] Current Thread [Next in Thread>