For instance, I have an environment myEnv
which lives in my package Test
. So why on earth does getPackageName(myEnv)
return the current time "2014-02-03 17:17:23"
instead of "Test"
??
# In /R/Test.R
myEnv <- new.env()
print(getPackageName(myEnv))
# Now build in RStudio:
==> Rcmd.exe INSTALL --no-multiarch --with-keep.source Test
<other messages here>
** preparing package for lazy loading
[1] "2014-02-03 17:17:23"
Warning in getPackageName(myEnv) :
Created a package name, '2014-02-03 17:17:23', when none found
<etc etc etc>
I don't see this behaviour or its reasoning documented anywhere. Indeed, this can wreak havoc, as clearly demonstrated by this question, hence every time I create an environment I have to remember to do something like setPackageName("Test", myEnv)
to associate it with my package.
This just seems superfluous and unnecessary, so why have this behaviour?