Sarang Manjrekar
Sarang Manjrekar

Reputation: 1991

object is masked by GlobalEnv error

I have installed package pryr in my R studio and now trying to import the same, using

library(pryr)

Getting the error as :

Attaching package: ‘pryr’

The following object is masked _by_ ‘.GlobalEnv’:

    f

What shall be done, so that I can import it.

Upvotes: 0

Views: 1929

Answers (1)

Hong Ooi
Hong Ooi

Reputation: 57686

You've successfully loaded pryr. Congratulations!

The message is telling you that you have an object f in your global environment. There is also a function called f that is exported by pryr. If you try to use this function, you may end up referring to your own f instead, causing problems. To disambiguate, you can use pryr::f to refer to the f in pryr.

Upvotes: 2

Related Questions