I'm mystified as to why a statement in .Rprofile has such a different effect from regular code. Specifically, I want to include library("dplyr")
in .Rprofile to have it always loaded in OSX.
The effect of an .Rprofile as follows:
library("lubridate")
library("dplyr")
is:
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
If .Rprofile only has library("lubridate")
, the effect of library("dplyr")
as the first statement in an R session is:
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
As a result dplyr commands like filter
do not work properly. Why is this?