Re: [R] masked from package:base?

From: Arne Henningsen <ahenningsen_at_email.uni-kiel.de>
Date: Fri 02 Dec 2005 - 18:42:18 EST

On Friday 02 December 2005 02:50, August Berg wrote:
> I am confused by the following description in
> http://www.maths.lth.se/help/R/.R/library/systemfit/html/hausman.systemfit.
>html
>
> what does the "Not run" mean?

This means that the command "library( systemfit )" is not executed when the package is checked by "R CMD check".

@Jeff: I think we should remove "library( systemfit )" from the example section, because everybody should know this.

> if we do not load systemfit, how can we run
> the following code?
>
> ## Not run: library( systemfit )
>
> data( kmenta )
> attach( kmenta )
> ...
>
> I install the package of systemfit, and run the code.
>
> I got the warning:
> > library( systemfit )
> > data( kmenta )
> > attach( kmenta )
>
> The following object(s) are masked from package:base :
>
> q

The data set "kmenta" has a (column) name called "q" R> names(kmenta)
[1] "q" "p" "d" "f" "a"

If you attach these data to the search path, there are two objects with the name "q": the quantity from Kmenta's data set and the function to quit R. Hence, attaching this data set masks the function "q" (quit) from the package called "base". However, you don't have to worry, because "q()" and "?q" still work as expected.

@Jeff: Since using "attach" is often troublesome, I suggest that we remove "attach( kmenta )" from the example section and use "systemfit( ..., data = kmenta )" instead.

Best wishes,
Arne

>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
ahenningsen@agric-econ.uni-kiel.de
http://www.uni-kiel.de/agrarpol/ahenningsen/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Dec 02 18:46:34 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:28 EST