Skip to content

Commit

Permalink
Merge branch 'pre-release-cleanup@main' of https://github.com/insight…
Browse files Browse the repository at this point in the history
…sengineering/teal.slice into pre-release-cleanup@main
  • Loading branch information
kartikeyakirar committed Jan 5, 2024
2 parents f26b5af + 3898491 commit 1f8f179
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ To understand how to use this package, please refer to the [Introduction to teal

## Getting help

If you encounter any bug or have a feature request, please file an issue. For questions, discussions, and updates, use the `teal` channel in the workspace.[`pharmaverse` slack workspace](https://pharmaverse.slack.com).
If you encounter a bug or have a feature request, please file an issue. For questions, discussions, and updates, use the `teal` channel in the [`pharmaverse` slack workspace](https://pharmaverse.slack.com).

## Stargazers and Forkers

Expand Down
14 changes: 7 additions & 7 deletions vignettes/filter-panel-for-developers.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ vignette: >
All filter panel classes have dedicated methods to set and get the current filter state.
These methods include:

- `get_filter_state` - returns the current state of filters in the form of `teal_slices` object
- `set_filter_state` - adds or modifies the filters based on `teal_slices` object
- `get_filter_state` - returns current state of filters as `teal_slices` object
- `set_filter_state` - adds or modifies filters based on `teal_slices` object
- `remove_filter_state` - removes particular filter states based on `teal_slices` object
- `clear_filter_states` - removes all filter states

Expand Down Expand Up @@ -48,15 +48,15 @@ Each `teal_slice` object contains all the information necessary to:

3. Control the behavior and appearance of the `FilterState` object:

- `choices` - determines the set of values or the range that can be selected from
- `choices` - determines set of values or range that can be selected from
- `multiple` (only for `ChoiceFilterState`) - allows multiple values to be selected
- `fixed` - forbids changing state of the `FilterState`
- `anchored` - forbids the removal of the `FilterState`
- `anchored` - forbids removing the `FilterState`
- `title` - displayed title of the filter card

In addition, every `teal_slice` object has an `id`.

It is impossible to create `FilteredData` with slices with duplicates `id`s.
It is impossible to create `FilteredData` with slices with duplicated `id`s.
This is because filter states are both created and modified with the `set_filter_state` method
so if two consecutive calls to `set_filter_state` are passed a `teal_slice` with the same id,
the first call will instantiate a `FilterState`, and the second call will modify it.
Expand Down Expand Up @@ -138,7 +138,7 @@ set_filter_state(
```

2. `exclude_varnames` defines which columns in the used data sets are **not** allowed to be filtered on.
In the following example, all variables except the four will be available to choose from.
In the following example all variables except the four will be available to choose from.
```{r}
set_filter_state(
datasets,
Expand All @@ -151,7 +151,7 @@ set_filter_state(
)
```

3. `count_type` defines how observation counts displayed in filter cards
3. `count_type` defines how observation counts are displayed in filter cards

| "none" | "all" |
|--------|-------|
Expand Down
2 changes: 1 addition & 1 deletion vignettes/teal-slice-classes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ A `FilterState` is created as follows:

All child classes handle missing values, and `RangedFilterState` also handles infinite values.

The `FilterState` constructor also takes the `extract_type` argument, which determines how the call is constructed `extract_type` can be unspecified, `"matrix"` or `"list"` and its value corresponds to the type of the variable prefix in the returned condition call. If `extract_type` is `"list"`, the variable in the condition called is `<dataname>$<varname>`, while for `"matrix"` it would be `<dataname>[, "<varname>"]`.
The `FilterState` constructor also takes the `extract_type` argument, which determines how the call is constructed `extract_type` can be unspecified, `"matrix"` or `"list"` and its value corresponds to the type of the variable prefix in the returned condition call. If `extract_type` is `"list"`, the variable in the condition call is `<dataname>$<varname>`, while for `"matrix"` it would be `<dataname>[, "<varname>"]`.

### `FilterStateExpr`

Expand Down

0 comments on commit 1f8f179

Please sign in to comment.