Skip to content
Prev 220820 / 398500 Next

What's data() for?

On 13-May-10 23:43:58, yjmha69 wrote:
The difference is that data(pima) will load the dataset pima
(which can be found in the package "faraway") without the use
of library(faraway). It won't load anything else from faraway.

When you use library(faraway) you will load everything in the
package faraway, including of course the dataset pima (which is
why you see no difference, since that dataset is the same whichever
way you load it).

So with data() you put less load on your system, and also avoid
possible conflicts between what you already have in your environment
and what would be brought in when you do library(faraway).

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 14-May-10                                       Time: 10:35:15
------------------------------ XFMail ------------------------------