cs is used to create concept set expressions.
`exclude` is meant to be used inside `cs` when creating a new concept set.
`mapped` is meant to be used inside `cs` when creating a new concept set.
`descendants` is meant to be used inside `cs` when creating a new concept set.
cs(..., name, id = NULL)
exclude(...)
mapped(...)
descendants(...)
One or more numeric vectors that can be coerced to integers, or Calls to helper functions "exclude", "descendants", or "mapped".
A name for the concept set
An id for the concept set
A Capr Concept Set Object
A list of Capr concepts
A list of Capr concepts
A list of Capr concepts
exclude()
: exclude concepts
mapped()
: Include mapped concepts
descendants()
: Include descendants
cs(1, 2, name = "concepts")
#> -- <Capr Concept Set> concepts -------------------------------------------------
#> # A tibble: 2 x 9
#> conceptId conceptCode conceptName domainId vocabularyId standardConcept
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 "" "" "" "" ""
#> 2 2 "" "" "" "" ""
#> # i 3 more variables: includeDescendants <lgl>, isExcluded <lgl>,
#> # includeMapped <lgl>
cs(1, c(10, 11, 2), name = "concepts")
#> -- <Capr Concept Set> concepts -------------------------------------------------
#> # A tibble: 4 x 9
#> conceptId conceptCode conceptName domainId vocabularyId standardConcept
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 "" "" "" "" ""
#> 2 10 "" "" "" "" ""
#> 3 11 "" "" "" "" ""
#> 4 2 "" "" "" "" ""
#> # i 3 more variables: includeDescendants <lgl>, isExcluded <lgl>,
#> # includeMapped <lgl>
cs(1, seq(2, 10, 2), name = "concepts")
#> -- <Capr Concept Set> concepts -------------------------------------------------
#> # A tibble: 6 x 9
#> conceptId conceptCode conceptName domainId vocabularyId standardConcept
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 "" "" "" "" ""
#> 2 2 "" "" "" "" ""
#> 3 4 "" "" "" "" ""
#> 4 6 "" "" "" "" ""
#> 5 8 "" "" "" "" ""
#> 6 10 "" "" "" "" ""
#> # i 3 more variables: includeDescendants <lgl>, isExcluded <lgl>,
#> # includeMapped <lgl>
cs(1, 2, 3, exclude(4, 5), name = "concepts")
#> -- <Capr Concept Set> concepts -------------------------------------------------
#> # A tibble: 5 x 9
#> conceptId conceptCode conceptName domainId vocabularyId standardConcept
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 "" "" "" "" ""
#> 2 2 "" "" "" "" ""
#> 3 3 "" "" "" "" ""
#> 4 4 "" "" "" "" ""
#> 5 5 "" "" "" "" ""
#> # i 3 more variables: includeDescendants <lgl>, isExcluded <lgl>,
#> # includeMapped <lgl>
cs(1, 2, 3, exclude(4, 5), mapped(6, 7), name = "concepts")
#> -- <Capr Concept Set> concepts -------------------------------------------------
#> # A tibble: 7 x 9
#> conceptId conceptCode conceptName domainId vocabularyId standardConcept
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 "" "" "" "" ""
#> 2 2 "" "" "" "" ""
#> 3 3 "" "" "" "" ""
#> 4 4 "" "" "" "" ""
#> 5 5 "" "" "" "" ""
#> 6 6 "" "" "" "" ""
#> 7 7 "" "" "" "" ""
#> # i 3 more variables: includeDescendants <lgl>, isExcluded <lgl>,
#> # includeMapped <lgl>
cs(1, 2, 3, exclude(4, 5), mapped(6, 7), descendants(8, 9), name = "concepts")
#> -- <Capr Concept Set> concepts -------------------------------------------------
#> # A tibble: 9 x 9
#> conceptId conceptCode conceptName domainId vocabularyId standardConcept
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 "" "" "" "" ""
#> 2 2 "" "" "" "" ""
#> 3 3 "" "" "" "" ""
#> 4 4 "" "" "" "" ""
#> 5 5 "" "" "" "" ""
#> 6 6 "" "" "" "" ""
#> 7 7 "" "" "" "" ""
#> 8 8 "" "" "" "" ""
#> 9 9 "" "" "" "" ""
#> # i 3 more variables: includeDescendants <lgl>, isExcluded <lgl>,
#> # includeMapped <lgl>
cs(descendants(1, 2, 3), exclude(descendants(8, 9)), name = "concepts")
#> -- <Capr Concept Set> concepts -------------------------------------------------
#> # A tibble: 5 x 9
#> conceptId conceptCode conceptName domainId vocabularyId standardConcept
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 "" "" "" "" ""
#> 2 2 "" "" "" "" ""
#> 3 3 "" "" "" "" ""
#> 4 8 "" "" "" "" ""
#> 5 9 "" "" "" "" ""
#> # i 3 more variables: includeDescendants <lgl>, isExcluded <lgl>,
#> # includeMapped <lgl>