This will work on package dev environment but not on end-user computer (because test folder does not exist).
Instead, the example files should be located in the inst/extdata/ directory of the package so that they are made available to the user during package installation.
Then, the package should provide a utilitary function to easily access these files.
For example, if the example files are stored under inst/extdata/example we can add this in a example.R:
In the user manual, example files are loaded:
This will work on package dev environment but not on end-user computer (because test folder does not exist).
Instead, the example files should be located in the
inst/extdata/
directory of the package so that they are made available to the user during package installation.Then, the package should provide a utilitary function to easily access these files.
For example, if the example files are stored under
inst/extdata/example
we can add this in aexample.R
:This way, the vignettes could be updated to:
This will work both during vignette generation and on user's computer.