Hi David,

Thanks for your advice.  I got it.

But I can't resolve:

> 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@comcast.net>

Cc: Stefan Grosse <singularitaet@gmx.net>; r-help@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".

-- 
David.
> ________________________________
> From: Stefan Grosse <singularitaet@gmx.net>
>
> Sent: Sun, November 28, 2010 7:23:19 PM
> Subject: Re: [R] How to remove a package.
>
> Am 27.11.2010 09:48, schrieb Stephen Liu:
>
>> I found the datasets of AER
>
> cool.
>
>> detach("package:AER", unload = TRUE)
>
> detach(package:AER) works for me.
>
>> data()
>> still found "car" there.
>
> you mean "cars" ? This is not part of AER but in a base R  
> installation.
>
>>> install.packages("EcDat")
>
>> Where can I download/install EcDat?  TIA
>
> It is case sensitive, try install.packages("Ecdat") it works for me...
>
> Maybe you should try a little bit more...
>
> hth
> Stefan
>
>
>
>     [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.

David Winsemius, MD
West Hartford, CT


	[[alternative HTML version deleted]]

