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

clean up after pre-release-cleanup #537

Merged
merged 67 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
eed5e92
fix FilteredData instantiation
Jan 26, 2024
da964be
update docs for FilterState-utils
Jan 26, 2024
a37f60e
update docs for FilterState
Jan 26, 2024
9cbcaa6
update docs for FilterState
Jan 26, 2024
a49cf53
update docs for FilterState
Jan 26, 2024
ce1d380
update docs for ChoicesFilterState
Jan 26, 2024
cba6202
update docs for ChoicesFilterState
Jan 26, 2024
b8daaa8
update docs for DateFilterState
Jan 26, 2024
027663f
update docs for DatetimeFilterState
Jan 26, 2024
d7a3533
update docs for EmptyFilterState
Jan 26, 2024
8f6b4b7
update docs for FilterStateExpr
Jan 26, 2024
474cfd5
update docs for LogicalFilterState
Jan 26, 2024
ebef7e4
update docs for RangeFilterState
Jan 26, 2024
cd3893a
minor update
Jan 26, 2024
da194fa
add return value description to init on FilterState daughters
Jan 26, 2024
144a383
fix documentation for FilterStates utils
Jan 26, 2024
b6e4083
filtering -> subsetting
Jan 26, 2024
2b3fae6
tweak Description in DESCRIPTION
Jan 26, 2024
84eb327
remove mention of na_rm (old relic)
Jan 26, 2024
d095acf
subsetting call -> condition call
Jan 26, 2024
14120fa
clean up FilterStates
Jan 26, 2024
c04baea
fix docs for DFFilterStates
Jan 26, 2024
3d26fa3
fix docs for MAEFilterStates
Jan 26, 2024
e65322d
fix docs for MatrixFilterStates
Jan 26, 2024
6da3c2d
fix docs for SEFilterStates
Jan 26, 2024
852f75a
update docs for FilteredData utils
Jan 26, 2024
6bfb0f2
update topological_sort
Jan 26, 2024
ef4db39
re-fix topological_sort
Jan 26, 2024
5242940
fix documentation ofr FilteredData
Jan 26, 2024
d5e69b8
update documentation ofr FilteredData
Jan 26, 2024
189547c
update server function return values
Jan 26, 2024
3d6e8ad
Merge branch 'post-pre-release-cleanup-cleanup@main' of github.com:in…
Jan 26, 2024
4c0c62d
update documentation for FilteredDataset utils
Jan 26, 2024
f79a299
update documentation for FilteredDataset
Jan 26, 2024
1b62b2a
missing periods
Jan 26, 2024
4c2c816
update documentation for DataframeFilteredDataset
Jan 26, 2024
aa36973
update documentation for DefaultFilteredDataset
Jan 26, 2024
cd8c3ca
update documentation for DefaultFilteredDataset
Jan 26, 2024
33e30ba
update documentation for MAEFilteredDataset
Jan 26, 2024
ca5c688
update filter_panel_api
Jan 26, 2024
afc764a
finishing touches
Jan 26, 2024
923251c
locked -> anchored
Jan 26, 2024
220e7e7
Merge 923251ceb70b5f27aecd485f78d60aed4f67182d into d108440fa4efd5d7c…
chlebowa Jan 26, 2024
fe0239b
[skip actions] Restyle files
github-actions[bot] Jan 26, 2024
afe4906
spelling
Jan 26, 2024
7d8ac2c
linter
Jan 26, 2024
7808ebc
Merge branch 'post-pre-release-cleanup-cleanup@main' of github.com:in…
Jan 26, 2024
f61a12f
fix return values in FilterState etc.
Jan 29, 2024
dd244e1
fix param descriptions
Jan 30, 2024
5ae8cc2
more return values
Jan 30, 2024
b45cfd6
fix typo
Jan 30, 2024
613b212
verify return values
Jan 30, 2024
b7a22c8
typo
chlebowa Jan 30, 2024
f9b8030
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 30, 2024
767510d
reorder types in FilterState docs
Jan 30, 2024
a75457d
improve docs for set_keep_na nad set_keep_inf
Jan 30, 2024
715a717
missing period
chlebowa Jan 30, 2024
cee1fa6
typo
chlebowa Jan 30, 2024
b176a06
typo
chlebowa Jan 30, 2024
03165fa
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 30, 2024
58059e5
sort out docs for get_filter_overview
Jan 30, 2024
e5e95e4
fix test descriptions
Jan 30, 2024
17c3550
update count_labels documentation
Jan 30, 2024
8b8f87a
remove TODO
Jan 30, 2024
6803421
remove more TODOs
Jan 30, 2024
e9e2e9a
update note about init_filter_states
Jan 30, 2024
82c8406
507 reevaluate `variable_types` (#508)
chlebowa Jan 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Authors@R: c(
person("Junlue", "Zhao", role = "aut"),
person("F. Hoffmann-La Roche AG", role = c("cph", "fnd"))
)
Description: Module containing filter panel for 'teal' applications.
Description: Data filtering module for 'teal' applications.
Allows for interactive filtering of data stored in 'data.frame' and
'MultiAssayExperiment' objects. Also displays filtered and unfiltered
observation counts.
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export(as.teal_slices)
export(clear_filter_states)
export(get_filter_expr)
export(get_filter_state)
export(get_supported_filter_varnames)
export(init_filter_states)
export(init_filtered_data)
export(init_filtered_dataset)
Expand Down
8 changes: 4 additions & 4 deletions R/FilterPanelAPI.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' filter panel API.
#'
#' @examples
#' fd <- init_filtered_data(list(iris = list(dataset = iris)))
#' fd <- init_filtered_data(list(iris = iris))
#' fpa <- FilterPanelAPI$new(fd)
#'
#' # get the actual filter state --> empty named list
Expand Down Expand Up @@ -71,7 +71,7 @@ FilterPanelAPI <- R6::R6Class( # nolint
#' Sets active filter states.
#' @param filter (`teal_slices`)
#'
#' @return `NULL` invisibly
#' @return `NULL`, invisibly.
#'
set_filter_state = function(filter) {
private$filtered_data$set_filter_state(filter)
Expand All @@ -85,7 +85,7 @@ FilterPanelAPI <- R6::R6Class( # nolint
#' specifying `FilterState` objects to remove;
#' `teal_slice`s may contain only `dataname` and `varname`, other elements are ignored
#'
#' @return `NULL` invisibly
#' @return `NULL`, invisibly.
#'
remove_filter_state = function(filter) {
private$filtered_data$remove_filter_state(filter)
Expand All @@ -99,7 +99,7 @@ FilterPanelAPI <- R6::R6Class( # nolint
#' `datanames` to remove their `FilterStates`;
#' omit to remove all `FilterStates` in the `FilteredData` object
#'
#' @return `NULL` invisibly
#' @return `NULL`, invisibly.
#'
clear_filter_states = function(datanames) {
datanames_to_remove <- if (missing(datanames)) private$filtered_data$datanames() else datanames
Expand Down
29 changes: 17 additions & 12 deletions R/FilterState-utils.R
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
#' Initializes `FilterState`
#' Initialize `FilterState`
#'
#' Initializes `FilterState` depending on a variable class.
#' Initializes a `FilterState` object corresponding to the class of the filtered variable.
#'
#' @param x (`vector`)
#' values of the variable used in filter
#' variable to be filtered.
#' @param x_reactive (`reactive`)
#' returning vector of the same type as `x`. Is used to update
#' counts following the change in values of the filtered dataset.
#' If it is set to `reactive(NULL)` then counts based on filtered
#' dataset are not shown.
#' @param slice (`teal_slice`)
#' object created using [teal_slice()].
#' specification of this filter state.
#' `teal_slice` is stored in the object and `set_state` directly manipulates values within `teal_slice`.
#' `get_state` returns `teal_slice` object which can be reused in other places.
#' Note that `teal_slice` is a `reactiveValues`, which means it has reference semantics, i.e.
#' changes made to an object are automatically reflected in all places that refer to the same `teal_slice`.
#' @param extract_type (`character`)
#' specifying whether condition calls should be prefixed by `dataname`. Possible values:
#' - `character(0)` (default) `varname` in the condition call will not be prefixed
#' - `"list"` `varname` in the condition call will be returned as `<dataname>$<varname>`
#' - `"matrix"` `varname` in the condition call will be returned as `<dataname>[, <varname>]`
#' @param ... additional arguments to be saved as a list in `private$extras` field
#'
#' @examples
#' # use non-exported function from teal.slice
#' include_js_files <- getFromNamespace("include_js_files", "teal.slice")
#' init_filter_state <- getFromNamespace("init_filter_state", "teal.slice")
#'
#' filter_state <- init_filter_state(
#' x = c(1:10, NA, Inf),
#' x_reactive = reactive(c(1:10, NA, Inf)),
#' slice = teal_slice(
#' varname = "x",
#' varname = "varname",
#' dataname = "dataname"
#' ),
#' extract_type = "matrix"
Expand Down Expand Up @@ -218,11 +220,7 @@ init_filter_state.POSIXlt <- function(x,
#' Initialize a `FilterStateExpr` object
#'
#' @param slice (`teal_slice_expr`)
#' object created using [teal_slice()]. `teal_slice` is stored
#' in the class and `set_state` directly manipulates values within `teal_slice`. `get_state`
#' returns `teal_slice` object which can be reused in other places. Beware, that `teal_slice`
#' is a `reactiveValues` which means that changes in particular object are automatically
#' reflected in all places which refer to the same `teal_slice`.
#' specifying this filter state.
#'
#' @return `FilterStateExpr` object
#' @keywords internal
Expand All @@ -241,6 +239,13 @@ init_filter_state_expr <- function(slice) {
#' set to NULL to omit adding the alpha channel
#'
#' @return Named `character(1)` containing a hexadecimal color representation.
#'
#' @examples
#' fetch_bs_color <- getFromNamespace("fetch_bs_color", "teal.slice")
#' fetch_bs_color("primary")
#' fetch_bs_color("danger", 0.35)
#' fetch_bs_color("danger", "80")
#'
#' @keywords internal
#'
fetch_bs_color <- function(color, alpha = NULL) {
Expand Down
Loading