This question already has an answer here:
I'm a newbie to R and am trying to install the gdata
package so that I can work with excel files. When I tried to load the package, I received the following message:
> library(gdata)
gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.
Attaching package: ‘gdata’
The following object is masked from ‘package:stats’:
nobs
The following object is masked from ‘package:utils’:
object.size
I'm not sure, if I should be concerned about the last two lines. As far as I understood from other posts, they are a notice that some R functions I type in may be overridden in gdata
, and vice-versa depending on my settings. But I see no trace of gdata
on my screen anywhere (for example when I load JGR a new window pops up in my console). Everything looks the same as before I had loaded gdata
. Can you please confirm if that means I have successfully loaded gdata
?
Have a look at
print(.packages())
If "gdata" is inside, then the package is successfully loaded. I suspect the package has been loaded, because you got the warning message for masking.
You don't need to worry too much about masking. You can always do gdata::nobs
and stats::nobs
to call nobs
function in different packages. Similarly, you can always do gdata::object.size
and utils::object.size
to get the right function.
来源:https://stackoverflow.com/questions/38127427/gdata-object-is-masked