nat.templatebrains (version 1.0)

add_reg_folders: Set or list local folders containing registrations for nat.templatebrains

Description

add_reg_folders sets options('nat.templatebrains.regdirs') appropriately so that registrations can be found by e.g. xform_brain.

extra_reg_folders lists extra registration folders present in standard location

Usage

add_reg_folders(dir = extra_reg_folders(), first = TRUE)

extra_reg_folders(full.names = TRUE)

Arguments

dir

Path to one or more folders containing registrations. Default value will scan for registration folders in a standard location. (Please see Details and File layout sections)

first

Whether the new folder should be added to the start (default) or end of the search list.

full.names

Whether to list full path to registration folders

File layout

You must pass a folder containing one or more registrations, not the registration folder itself. So if you have this situation on disk

  • myregistrations/

  • myregistrations/reg1.list

  • myregistrations/reg2.list

you should write add_reg_folders("/path/to/myregistrations")

Details

When dir is unset then it will default to the value of extra_reg_folders() i.e. any folders / cloned repositories in the standard location

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
  add_reg_folders("myextraregistrations")
# }
# NOT RUN {
# adding a non-existent folder will generate an error
tools::assertError(add_reg_folders(tempfile()))
# }

Run the code above in your browser using DataLab