Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review teal.slice documentation before release #243

Merged
merged 13 commits into from
Apr 13, 2023
18 changes: 13 additions & 5 deletions R/calls_combine_by.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@
#'
#' @examples
#' \dontrun{
#' fs_ch <- ChoicesFilterState$new(x = c("F", "M"), varname = "SEX")
#' fs_ch$set_state(list(selected = c("F")))
#'
#' fs_rng <- RangeFilterState$new(x = 1:100, varname = "AGE")
#' fs_rng$set_state(list(selected = c(20, 50)))
#'
#' fs_log <- LogicalFilterState$new(x = c(TRUE, FALSE), varname = "SURV")
#' fs_log$set_state(list(selected = TRUE))
#'
#' calls <- list(
#' call_condition_choice("SEX", "F"),
#' call_condition_range("AGE", c(20, 50)),
#' call_condition_choice("ARM", "ARM: A"),
#' call_condition_logical("SURV", TRUE)
#' shiny::isolate(fs_ch$get_call()),
#' shiny::isolate(fs_rng$get_call()),
#' shiny::isolate(fs_log$get_call())
#' )
#' calls <- lapply(calls, str2lang)
#'
BLAZEWIM marked this conversation as resolved.
Show resolved Hide resolved
#' calls_combine_by(calls, "&")
#' }
#' @return a combined `call`
Expand Down
18 changes: 13 additions & 5 deletions man/calls_combine_by.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions vignettes/teal-slice.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ if (interactive()) {
The `FilteredData` object (`datasets` above) provides additional methods (such as `datasets$get_call(<dataname>)` to get the code used to filter the data) and is also possible to programmatically set the state of the filter panel using the `set_filter_state` function for example:

```{r, eval=FALSE}
set_filter_state(
datasets,
list(iris = list(Species = list(selected = c("setosa", "versicolor"))))
shiny::isolate(
set_filter_state(
datasets,
list(iris = list(Species = list(selected = c("setosa", "versicolor"))))
)
)
```

Expand Down