Add/remove/replace software category keywords

modify_software_category(action, name, term, old.term = NULL,
  new.term = NULL)

Arguments

action

(character) Action to perform: "add", "remove", or "replace".

name

(character) Software name(s). Use name = "all_imcr_software" to apply the action to all IMCR software.

term

(character) Keyword(s) to "add" or "remove". If adding, use terms from the IMCR Controlled Vocabulary.

old.term

(character) Keyword to be replaced (only used with action = "replace").

new.term

(character) Keyword to replace old.term (only used with action = "replace").

Value

(list) Updated software JSON for the specified name and added to the imcr_json object in the global environment. (logical) Updated imcr_json_mod_index object in the global environment, which indicates the specified name has been modified and is used by put_software().

Examples

# NOT RUN {
# Get all IMCR software JSON metadata
get_imcr_json()

# Add terms
modify_software_category("add", "arrow", c("quality control", "import"))

# Remove terms
modify_software_category("remove", "arrow", "quality control")

# Replace terms
modify_software_category("replace", "arrow", old.term = "import", new.term = "loading")

# Login to theIMCR and update modified software metadata
login()
put_software()
# }