Meaning of objects being masked by the global environment

r

Solution

It means that you have objects (functions, usually) present in your global environment with the same name as (exported) things in your package. Type `search()` to see the order in which R resolves names.

The solution is to either,

- don't create objects with those names in your global environment

- rename the objects in your package to something that's less likely to create a conflict, or rethink your decision to export them, or

- remember that you will always have to refer to those objects as `saber::teamStats`.

Probably (2) is best, unless the circumstances that led to the message are truly unusual.

Problem

When I load my package into the global environment, I get the following message ``` > library(saber) Attaching package: ‘saber’ The following objects are masked _by_ ‘.GlobalEnv’: load.schedule, teamStats ``` I don't know what that means, nor whether I should be concerned about it. Why is this message being delivered, and what does it mean?

Original source