我很困惑为什么 .Rprofile 中的语句与常规代码有如此不同的效果。具体来说,我想包含library("dplyr")
在 .Rprofile 中以使其始终加载到 OSX 中。
一个.Rprofile的效果如下:
library("lubridate")
library("dplyr")
是:
Attaching package: ‘dplyr’
The following objects are masked from ‘package:lubridate’:
intersect, setdiff, union
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
如果 .Rprofile 只有,则作为 R 会话中的第一条语句library("lubridate")
的效果是:library("dplyr")
Attaching package: ‘dplyr’
The following object is masked from ‘package:stats’:
filter
The following objects are masked from ‘package:lubridate’:
intersect, setdiff, union
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
结果 dplyr 之类的命令filter
无法正常工作。为什么是这样?