gdata - “object is masked…” [duplicate]

非 Y 不嫁゛ 提交于 2019-12-02 13:57:20

问题


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?


回答1:


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!