Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5057

Where to put config.yml in an R package

$
0
0

I am creating an R package that uses the config package to read a config.yml file.

My question is: where does config.yml go? config.get() expects it to be in the root directory, so if I put it at <my_package>/config.yml, it locates it with no problem. However, devtools::check() hates this:

Non-standard file/directory found at top level:'config.yml'

The closest explanation I've seen for what you are supposed to do only applies to when the config file is only used for unit tests. That's not my case; I need this config to actually be used by the package itself. I know I could fix this by just putting it in a directory like <my_package>/R/ and replacing every invocation of config::get() with something like config::get(here::here('R/config.yml')), but that seems hacky.

Is there a recommended way to do this?


Viewing all articles
Browse latest Browse all 5057

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>