getSelection: getSelection

Description Usage Arguments Value Examples

View source: R/getSelection.R

Description

Based on selecttable and a set of inputs

Usage

1
getSelection(selectable, input, duplicates.ok = FALSE)

Arguments

selectable

logical matrix: TRUE in row i and col j means that variable i in input j can be selected

input

list of numeric vectors: list of wished input values

duplicates.ok

logical: can variables be selected twice (default: FALSE)

Value

a logical matrix with the entries 0 (var can not be selected), 1 (var can be selected) and 2 (var is selected)

Examples

1
2
3
4
5
6
sel <- cbind(c(FALSE,FALSE,TRUE,TRUE,FALSE), 
             c(TRUE,FALSE,TRUE,FALSE,TRUE), 
             c(TRUE,TRUE,FALSE,FALSE,TRUE))
getSelection(sel, list(1,1,1))
getSelection(sel, list(1,1,1), duplicates.ok=TRUE)
getSelection(sel, list(1,1,c(1,2,5)))

sigbertklinke/shinyExample documentation built on May 26, 2019, 4:32 a.m.