Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify where to store inputs for internal data workflow code #1047

Open
kaijagahm opened this issue Mar 13, 2024 · 0 comments
Open

Clarify where to store inputs for internal data workflow code #1047

kaijagahm opened this issue Mar 13, 2024 · 0 comments

Comments

@kaijagahm
Copy link

kaijagahm commented Mar 13, 2024

I suggest clarifying where to store objects that get turned into internal data via workflow scripts as described in Internal Data.

Example: one of my package functions needs to refer to an internal shapefile (in order to perform a standard spatial filtering procedure). Following the instructions in the Internal Data section, I know that I should create workflow code that looks something like this:

shapefile <- sf::st_read("path/to/my/shapefile.kml")
usethis::use_data(shapefile, internal = TRUE)

The chapter is quite clear that this workflow code should be stored in data-raw/, but unless I'm missing something, there is no mention of where shapefile.kml should live. In other words, if you're creating an internal data object from some existing file, where should that source file go?

@jonthegeek suggests that it should also go in data-raw/ and gives the example of babynames. (Slack thread). Seems reasonable to me. So then we would have:

shapefile <- sf::st_read("data-raw/shapefile.kml")
usethis::use_data(shapefile, internal = TRUE)

Probably overkill, but "I assign the copyright of this contribution to Hadley Wickham" as per the contributing guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant