[R] Lubridate and NameSpace
peter dalgaard
pdalgd at gmail.com
Sun Mar 1 10:55:46 CET 2015
> On 01 Mar 2015, at 00:32 , Roy Mendelssohn - NOAA Federal <roy.mendelssohn at noaa.gov> wrote:
>
>> lubridate::%m+%
Actually trying it would have revealed
> lubridate::%m+%
Error: unexpected SPECIAL in "lubridate::%m+%"
Notice that this is a syntactical problem, not a semantic one; you cannot juxtapose two operators (:: and %m+%). Quoting is needed. Either of the following seems to work:
lubridate::"%m+%"
lubridate::`%m+%`
In the same vein, notice that the result of the above is not an operator unless assigned to something of the form %foo%. I.e.
lubridate::`%m+%`(a,b)
f <- lubridate::`%m+%`
f(a,b)
`%mym+%` <- f
a %mym+% b
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list