[R] How to remove a package.

Gavin Simpson gavin.simpson at ucl.ac.uk
Mon Nov 29 16:38:28 CET 2010


On Sun, 2010-11-28 at 07:58 -0800, Stephen Liu wrote:
> Hi David,
> 
> Thanks for your advice.  I got it.
> 
> But I can't resolve:

*sigh*

The packages are listed in alphabetical sort order, hence AER comes
before car comes before datasets comes before Ecdat...

You just need to page-down through the list of package data sets to see
later ones.

Seriously, and I don't mean to be rude, but instead of scatter-gun
replies to the list, try engaging your brain and actually look
*properly* at what is displayed...

G

> > library(AER)
> Loading required package: car
> Loading required package: MASS
> Loading required package: nnet
> Loading required package: survival
> Loading required package: splines
> Loading required package: Formula
> Loading required package: lmtest
> Loading required package: zoo
> Loading required package: sandwich
> Loading required package: strucchange
> 
> > data()
> displays "Data sets in package ‘AER’:"
> 
> But;
> > library(Ecdat)
> > data()
> displays "Data sets in package ‘datasets’:
> a large datasets including those in package "Ecdat"?  NOt only Ecdat separately.
> 
> B.R.
> Stephen L
> 
> 
> 
> 
> ________________________________
> From: David Winsemius <dwinsemius at comcast.net>
> 
> Cc: Stefan Grosse <singularitaet at gmx.net>; r-help at r-project.org
> Sent: Sun, November 28, 2010 11:16:34 PM
> Subject: Re: [R] How to remove a package.
> 
> 
> On Nov 28, 2010, at 7:16 AM, Stephen Liu wrote:
> 
> > Hi Stefan,
> >
> > Tks for your advice.
> 
> snipped
> 
> > Installation went through w/o problem.
> >
> >> library(Ecdat)
> >> data()
> >
> > Data sets in package ‘datasets’  NOT 'Ecdat'
> >
> >> ??Ecdat
> > ...
> > Ecdat::Caschool         The California Test Score Data Set
> > Ecdat::Griliches        Wage Datas
> > Ecdat::MCAS             The Massashusets Test Score Data Set
> > Ecdat::MunExp           Municipal Expenditure Data
> > Ecdat::Orange           The Orange Juice Data Set
> > Ecdat::Solow            Solow's Technological Change Data
> > Ecdat::TranspEq         Statewide Data on Transportation Equipment
> >                        Manufacturing
> > ....
> >
> >
> > Those files are in Ecdat packages.
> >
> >> Caschool
> > Error: object 'Caschool' not found
> >
> >> MCAS
> > Error: object 'MCAS' not found
> 
> Because loading the package does not necessarily register the datasets:
> 
> > require(Ecdat)
> Loading required package: Ecdat
> > data()  #------> produces a large list including
> Car                              Stated Preferences for Car Choice
> Caschool                         The California Test Score Data Set
> Catsup                           Choice of Brand for Catsup
> Cigar                            Cigarette Consumption
> > str(Caschool)
> Error in str(Caschool) : object 'Caschool' not found
> 
> > data(Car)
> > str(Car)
> 'data.frame':    4654 obs. of  70 variables:
>   $ choice    : Factor w/ 6 levels "choice1","choice2",..: 1 2 5 5 5 5  
> 2 5 5 2 ...
>   $ college   : num  0 1 0 0 0 0 1 1 0 1 ...
>   $ hsg2      : num  0 1 1 0 1 0 1 0 0 0 ...
> 
> Note that this dataset was NEVER  spelled "car".
> 
> ______________________________________________
> R-help at 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.

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list