Is it possible to manually create and load a namespace environment foo (without making an actual foo package), so that we can use the double colon operator foo::test to access objects in this environment?
The attach function attaches a list or environment to the search path:
foo <- list(test=123)
attach(foo)
get("test", "foo")
But this does give the user access to foo::test obviously.