Skip to contents

generate a selectInput control for an ontologyIndex slice

Usage

makeSelectInput(
  onto,
  term,
  type = "siblings",
  inputId,
  label,
  multiple = TRUE,
  ...
)

Arguments

onto

ontologyIndex instance

term

character(1) term used as basis for term list option set in the control

type

character(1) 'siblings' or 'children', relationship to 'term' that the options will satisfy

inputId

character(1) for use in server

label

character(1) for labeling in ui

multiple

logical(1) passed to selectInput

...

additional parameters passed to selectInput

Value

a selectInput control

Examples

makeSelectInput
#> function (onto, term, type = "siblings", inputId, label, multiple = TRUE, 
#>     ...) 
#> {
#>     stopifnot(term %in% onto$name)
#>     print(type)
#>     stopifnot(type %in% c("siblings", "children"))
#>     ind = match(term, onto$name)
#>     tag = onto$id[[ind]]
#>     if (type == "siblings") 
#>         tset = siblings_TAG(tag, onto)
#>     else if (type == "children") 
#>         tset = children_TAG(tag, onto)
#>     selectInput(inputId, paste0(label, ": ", term, " (", type, 
#>         ")"), choices = unname(tset@cleanFrame$clean), multiple = multiple, 
#>         ...)
#> }
#> <bytecode: 0x3012978c8>
#> <environment: namespace:ontoProc>