A lot of those changes are of course in the on-line Errata at
http://www.stats.ox.ac.uk/pub/MASS4/Errata4.1 . E.g.
R Changes
=========
p.12 As from R 1.7.0 data() is not needed for our datasets, but it
is needed for R's own datasets ability.cov, iris3 and swiss
prior to R 2.0.0.
On Thu, 8 Nov 2007, [EMAIL PROTECTED] wrote:
The book came out in 2002 and a lot has happened with R in the time since then.
In particular it is now possible for R to have 'lazy loading' of objects. If
the person setting up the package has used this option (as they all now
should), when the package is loaded R essentially is made aware that the data
(and other) objects are there, so it is visible, but it is only read into
memory if it is used. The little tag that alerts R to the existence of the
object and triggers the automatic loading on demand is called a 'promise' and
the action itself is called a 'delayed assign'.
Previously this all had to be done manually. data() could be used either to
discover what data objects were available in packages, or to load them in to
memory. Many old-style packages still require you to do this. There are cases
where it is justified, I suppose, but they are quite hard to think of...
With R you have to keep abreast of developments, and it's all happening pretty
fast.
Bill Venables.
PS Since you are new to R, it is not considered very friendly to send messages
to the R groups anonymously.
Bill Venables
CSIRO Laboratories
PO Box 120, Cleveland, 4163
AUSTRALIA
Office Phone (email preferred): +61 7 3826 7251
Fax (if absolutely necessary): +61 7 3826 7304
Mobile: +61 4 8819 4402
Home Phone: +61 7 3286 7700
mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.cmis.csiro.au/bill.venables/
<http://www.cmis.csiro.au/bill.venables/>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ]
On Behalf Of envisage
Sent: Thursday, 8 November 2007 1:27 PM
To: r-help@r-project.org
Subject: [R] a newbie question about "data"
hi, I am reading Modern Applied Statistics with S 4th ed¡£
page4 have these two lines:
library(MASS)
data(chem) # needed in R only
but I find withou the line " data(chem)"
I can still access chem, isn't it?
is it unnecessary or something i missed here?
thanks for the replay in advance.
--
Brian D. Ripley, [EMAIL PROTECTED]
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
R-help@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.