insightsengineering / insightsengineering/teal.slice

Add examples to set_filter_state methods of `FilterStates` specializations

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
core documentation
Dominant language
R
Stars
12
Forks
7
Avg merge
3d 31m
Merged PRs (30d)
1

Description

The `MAEFilterStates` and `SEFilterStates` have no documentation on how to use them, and the code is far from easy to understand (even if I understand the code, the why escapes me). I ended up in a position where I couldn't create a working example of `set_filter_state` for `SEFilterState` that included the `select` part of the state. It would also be nice to know what this `select` relates to because it's unclear. The mapping between the `state` argument and an `MAE` object is undefined and hard to guess. The problem is compounded by the fact that the `state` object must have a different structure for different specialisations of `FilterStates`, which is fine but makes any examples for one specialisation virtually useless for another. The description in the vignette is cryptic as well:
![image](https://user-images.githubusercontent.com/24480246/167589132-950b8169-16d7-4810-a8a2-ef71ef1e0599.png)

None of it explains the mapping, and since there's no working example, there's no way to observe the behaviour.

Objective:
* write examples for the method `set_filter_state` for all specializations of `FilterStates`
* (optionally) improve the vignette by explaining the mapping of `state` to an `MAE` object.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.