modify_software_category: Add/remove/replace software category keywords

Description Usage Arguments Value Examples

View source: R/modify_software_category.R

Description

Add/remove/replace software category keywords

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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()

## End(Not run)

IMCR-Hackathon/toolkit documentation built on Oct. 30, 2019, 7:14 p.m.