Description Usage Arguments Details Value Examples
Try to find path
under root directory even
if the original path is missing
1 | find_path(path, root_dir)
|
path |
path to a file. It's fine if the file is missing |
root_dir |
root directory of the file |
When file is absent, find_path
concatenates the
root directory and path combined to find the file. For example,
if the root directory is "~/"
, and path is "a/b/c/d"
,
the function first seek for existence of "~/a/b/c/d"
. If failed,
then "~/b/c/d"
, and then "~/c/d"
until reaching
top (root directory).
The absolute path of file if exists, or NULL
if
missing/failed.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# This example runs when demo (YAB) data are installed
# Case 1: path exists from root directory
find_path('demo/YAB/rave/meta/electrodes.csv',
root_dir = '~/rave_data/data_dir')
# Case 2: path missing from root directory
find_path('random/folder/not/exists/demo/YAB/rave/meta/electrodes.csv',
root_dir = '~/rave_data/data_dir')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.