In R, connections supported by url() function support the scheme:
- file://
- http://
- https://
- ftp://
There is additional support in other packages:
but i do not find anything to introduce some custom schema/protocol handler.
Something similar to Java URLStreamHandler
In particular, I'm looking for a way to reference data from local library packages in a "uniform" way. Something like this:
for current package:
- data:///my-dataset.rda, mapping to data folder
- extdata:///folder1/my-datafile.txt, mapping to [inst]/extdata/folder1
for imported packages:
- data://imported-pkg/other-dataset.rda
- extdata://imported-pkg/folder2/other-datafile.txt
There are several functions that enable this:
but mixing network URLs and internal references in not uniform ...