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
Cannot access files in inst/ #1
Comments
My current solution to this problem includes the following steps:
Now, I can run I doubt this is considered a best practice, so I'll keep this issue open until I find a more elegant solution. |
What about a step in the plan that makes the files available? plan <- drake_plan(
get_files = target(
command = {
file_out("exdata/other-iris.xlsx")
copy_pkg_files()
},
trigger = trigger(change = packageVersion("drakepkg"))
)
) |
Or maybe you could just return the formally packaged versions of the datasets. plan <- drake_plan(
get_iris_data = target(
command = {
data(otheriris)
otheriris
},
trigger = trigger(change = packageVersion("drakepkg"))
)
) |
I like the way |
I think it would be best for most use cases if a workflow's data are included as formal datasets in the package -- it's very intuitive. The USGS groundwater model package that I mentioned before is a good illustration of this approach. Unfortunately, in my particular use case (GIS-type projects) I will run into file size limitation issues with this approach. A Github-hosted package with a bunch of ~5 GB .rda files isn't going to work very well. Instead, I would like to host the files outside the package (right now I'm experimenting with osf.io at Ben Marwick's suggestion) and write plans that allow the package user to download the files into their working directory. The directory junctions allow the same plan to work regardless of whether it's run in the directory where I'm developing So since my use case is likely to be more rare (and not good for a minimal example), I'll revise the package to include |
While working within the
drakepkg
directory itself, it would be nice if I couldmake()
plans that include filepaths in theinst/
directory.That won't work because when a user installs the package, the sub-directories of
inst/
are moved to the package root directory which breaks the filepaths included in the plan.The text was updated successfully, but these errors were encountered: