What is this odd package?

I was about to answer a question on stack overflow where someones dataset was named file1. As I started playing with that, I noticed the following:

I have no idea what that is. Any ideas?

It is not a package, most probably, just something on the search path, see search(). attach() can put things in the search path, and some packages, e.g. withr are using this.

Hm, I'm still confused what file1077236afa8fd is. What does it mean if it's something on the search path? That it's an attached package or R object? Should I be able to see it when running search()?

Running search() I see the following:

> search()
 [1] ".GlobalEnv"        "tools:rstudio"     "package:stats"     "package:graphics"  "package:grDevices" "package:utils"    
 [7] "package:datasets"  "package:methods"   "Autoloads"         "package:base"

Running searchpaths():

> searchpaths()
 [1] ".GlobalEnv"                                                              
 [2] "tools:rstudio"                                                           
 [3] "/Library/Frameworks/R.framework/Versions/3.4/Resources/library/stats"    
 [4] "/Library/Frameworks/R.framework/Versions/3.4/Resources/library/graphics" 
 [5] "/Library/Frameworks/R.framework/Versions/3.4/Resources/library/grDevices"
 [6] "/Library/Frameworks/R.framework/Versions/3.4/Resources/library/utils"    
 [7] "/Library/Frameworks/R.framework/Versions/3.4/Resources/library/datasets" 
 [8] "/Library/Frameworks/R.framework/Versions/3.4/Resources/library/methods"  
 [9] "Autoloads"                                                               
[10] "/Library/Frameworks/R.framework/Resources/library/base"

For whatever it's worth, I never use attach() and I took the screenshot after restarting the R session.

Does it have any methods?

Even if you don't use attach(), the packages you use might. This is how you typically put a custom list or environment on the search path:

❯ attach(list(foo = "bar"), name = basename(tempfile()))
❯ search()
 [1] ".GlobalEnv"         "file15f341fe27c68"  "package:pkgdepends"
 [4] "devtools_shims"     "package:testthat"   "package:stats"
 [7] "package:graphics"   "package:grDevices"  "package:utils"
[10] "package:datasets"   "package:tracer"     "tools:prettycode"
[13] "package:prettycode" "package:methods"    "Autoloads"
[16] "package:base"

I don't think so. Though I don't know the appropriate way to test if something has any methods. I tried the following:


Error in methods(file1077236afa8fd) : 
  object 'file1077236afa8fd' not found