View source: R/check-annotation-keys.R
check_keys | R Documentation |
Check that a given set of keys are all present in an annotations dictionary
check_keys( x, annotations, allowlist_keys = NULL, success_msg = "All annotation keys are valid", fail_msg = "Some annotation keys are invalid", annots_link = "https://shinypro.synapse.org/users/nsanati/annotationUI/", return_valid = FALSE, syn )
x |
A data frame of annotation data |
annotations |
A data frame of annotations to check against |
allowlist_keys |
A character vector of annotation keys to allowlist. If provided, all values for the given keys will be treated as valid. |
success_msg |
Message indicating the check succeeded. |
fail_msg |
Message indicating the check failed. |
annots_link |
Link to a definition of the annotations being used in the project |
return_valid |
Should the function return valid values? Defaults to
|
syn |
Synapse client object |
A condition object indicating whether keys match the given annotation dictionary. Erroneous keys are included as data within the object.
annots <- data.frame( key = c("fileFormat", "fileFormat"), value = c("txt", "csv"), columnType = c("STRING", "STRING"), stringsAsFactors = FALSE ) check_keys("fileFormat", annots) check_keys("x", annots)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.