insightsengineering / teal

Exploratory Web Apps for Analyzing Clinical Trial Data
https://insightsengineering.github.io/teal/
Other
181 stars 39 forks source link

Documentation of setting default filters #85

Closed cicdguy closed 3 years ago

cicdguy commented 3 years ago
NEST/docs/hugo/NEST/agile-R/master//teal/sample_apps/sample-app-safety/) on agile-R that it is now possible to set default filters when the app starts. However, I could not find any documentation of this feature in agile-R. Is it missing or did I just look in the wrong place? In addition, looking at the code from the example app how can I access the help page of these functions from within `R`? ```r app$datasets$hold_filtering() # Set initial filter state as safety-evaluable population app$datasets$set_filter_state("ADSL", "SAFFL", "Y") # Set initial filter state as single study drug to produce smaller table app$datasets$set_filter_state("ADEX", "PARCAT2", "Drug A") # Set initial filter state as single lab parameter to produce smaller table app$datasets$set_filter_state("ADLB", "PARAMCD", "ALT") # Set initial filter state as post-baseline vital signs records for correct summary app$datasets$set_filter_state("ADVS", "ABLFL", "") app$datasets$set_filter_state("ADVS", "ABLFL2", "") app$datasets$continue_filtering() ``` Tagging other super users @Lil128 @dedicj @koukourk @codesformochi and @npaszty. Provenance: ``` Creator: neitmant ```
cicdguy commented 3 years ago
NEST/teal/blob/master/R/FilteredData.R so there is not help page for these methods. by the way, I think this should not be exposed to users, as there is `filter` argument in `teal::init`, maybe we can just update this `filter` argument to pass the state of filters Provenance: ``` Creator: lil128 ```
cicdguy commented 3 years ago

it is implemented in a newer version of teal here

NEST/teal/blob/9cecb7ade53ea742aa2b620360bdf042f74752be/R/init.R#L34 Provenance: ``` Creator: lil128 ```
cicdguy commented 3 years ago

Thanks @Lil128! I wasn't aware that this is now possible in the filter argument of init. In that case agile-R should not show this undocumented behavior but rather the "official" way to do it.

Provenance:

Creator: neitmant
cicdguy commented 3 years ago
NEST-Automation/hugo-docs/releases/devel/embedded/teal/articles/developer_apps.html#different-ways-to-specify-the-initial-filter-states. Is it something what you are looking for? @npaszty do you think it's worth to add it to agile-R. For me it's still not clear what should go where. Provenance: ``` Creator: pawelru ```
cicdguy commented 3 years ago

@pawelru Indeed, that vignette looks very much like what I'm looking for.

I think we have a "serious" issue regarding documentation. For me agile-R is the central place where I look for anything regarding NEST. TBh, I didn't even know that Teal has its own package website. Either we centralize all documentation or we make it very clear on agile-R that further info can be found in the package website and provide a link.

Provenance:

Creator: neitmant
cicdguy commented 3 years ago

@pawelru @neitmant @Lil128 wouldn't describe the state of documentation as 'serious'. there is an opportunity to scrub the documentation content and consider some re-organization. can always improve on it. pkgdown::build_site() is used for the NEST packages to build the documentation sites.

I think we do have a need to communicate more about the references/documentation and maybe NEST-SUN can play a role in that - article of the week maybe or something along those lines.

NEST/docs/hugo/NEST/agile-R/master/ that still reflects 2020_07_07. Would encourage this conversation to take place among NEST-SUN and Christof to plan and propose direction. Provenance: ``` Creator: npaszty ```
cicdguy commented 3 years ago

@npaszty Sorry for being a bit too dramatic here. agile-R is a great source of reference for NEST but as you said one can always improve documentation.

I'm in favor of the NEST super users to take ownership of agile-R. But obviously we need to stay in close contact with the dev team to make that work.

Provenance:

Creator: neitmant
cicdguy commented 3 years ago

@neitmant yes, partnering closely is key across the board between NEST-SUN and NEST Team. not sure how you guys and Christof are discussing these items in terms of overall direction but would think that's where it would be best to initiate identifying the plan to tackle the documentation work and then present back at appropriate NEST Team forum for discussion/feedback.

Provenance:

Creator: npaszty
pawelru commented 3 years ago

it's already in R6 class docs and also in teal::init() documentation