The following object(s) are masked from ‘package:stats’

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The following object(s) are masked from ‘package:stats’

David
My apologies in advance as this seem like an easy thing to fix.

I am quite new to using R. I am doing my thesis at the moment and I am trying to use the extremes package. However, when I try to access it I get this message:

The following object(s) are masked from ‘package:stats’:
> library( extRemes)
Loading required package: tcltk
Loading Tcl/Tk interface ... done
Loading required package: ismev
Loading required package: Lmoments
Attaching package: ‘extRemes’
The following object(s) are masked from ‘package:stats’:
qqnorm, qqplot

I looked back on some of the older post about this problem. Apparently it has something to do with the order of the packages.

> search()
 [1] ".GlobalEnv"        "package:extRemes"  "package:Lmoments"  "package:ismev"     "package:tcltk"     "package:stats"     "package:graphics"  "package:grDevices"
 [9] "package:utils"     "package:datasets"  "package:methods"   "Autoloads"         "package:base"    
> attach(stats)
Error in attach(stats) : object 'stats' not found

However, I still could not get it working.

Thanks for any help in advance
David

Reply | Threaded
Open this post in threaded view
|

Re: The following object(s) are masked from ‘package:stats’

Charlie Friedemann
David,

That message is not an error. It is simply telling you that there are functions named qqnorm an qqplot in the extRemes package that are "masking" functions of the same name in the stats package. Functions in a package being loaded with the same names as functions in a package already loaded will mask those previously loaded functions.

This means that if you call qqplot() or qqnorm() you will be using the versions found in the extRemes package.  If you wanted to use the version of qqplot in stats, you would have to call it by qualifying the namespace:

stats::qqplot

In any case, the package extRemes is loading properly for you and you can begin to use it.
Reply | Threaded
Open this post in threaded view
|

Re: The following object(s) are masked from ‘package:stats’

David
This post was updated on .
Hi Charlie,
Thanks for replying to my post, I really appreciate it.

I understand whats going on now.

Thank you once again
David