Skip to content

Commit

Permalink
@m7pr final change requests
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Feb 12, 2025
1 parent e074b7b commit c1314dc
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion inst/design/teal-transform-module-decorators.drawio
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<mxCell id="201" value="Transforming module outputs (decorators)" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
<mxGeometry x="530" y="1425" width="235" height="35" as="geometry"/>
</mxCell>
<mxCell id="202" value="Transforming the teal_data" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=11;verticalAlign=top;" vertex="1" parent="1">
<mxCell id="202" value="Transforming teal_data" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=11;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="852" y="1090" width="208" height="270" as="geometry"/>
</mxCell>
<mxCell id="203" style="edgeStyle=none;html=1;strokeColor=#000000;fontSize=28;" edge="1" parent="1" source="204" target="208">
Expand Down
2 changes: 1 addition & 1 deletion inst/design/teal-transform-module-transformators.drawio
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<mxCell id="174" value="Transform Panel (transformators)" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=50;" vertex="1" parent="1">
<mxGeometry x="545" y="1082.5" width="190" height="35" as="geometry"/>
</mxCell>
<mxCell id="175" value="Transforming the teal_data" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=11;verticalAlign=top;" vertex="1" parent="1">
<mxCell id="175" value="Transforming teal_data" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=11;verticalAlign=top;" vertex="1" parent="1">
<mxGeometry x="852.5" y="1090" width="207.5" height="270" as="geometry"/>
</mxCell>
<mxCell id="176" style="edgeStyle=none;html=1;strokeColor=#000000;fontSize=28;" edge="1" parent="1" source="177" target="181">
Expand Down
2 changes: 1 addition & 1 deletion vignettes/images/teal-transform-module-decorators.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion vignettes/images/teal-transform-module-transformators.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions vignettes/transform-input-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ vignette: >
## Introduction

`teal` version `0.16` introduced a new, optional argument in `teal::module`, `transformators`.
This argument accepts a `list` of `teal_transform_module` objects, which are a special class of `teal_transform_module` created using the `teal_transform_module()` function.
This argument accepts a `list` of `teal_transform_module` objects, which are created using the `teal_transform_module()` function.
`teal_transform_module()` takes `ui` and `server` arguments to create a `shiny` module that encodes data transformations.

When transformators are passed to a module, `teal` will execute data transformations when that module is loaded as well as whenever the original data changes.
Expand All @@ -25,7 +25,7 @@ This vignette describes how to manage custom data transformations in `teal` apps

<img src="images/teal-transform-module-transformators.svg" alt="Transforming teal_data" style="width: 100%;" />

In this vignette we will focus on using the `teal_transform_module` for transforming the input data using the `transformer` argument in `teal::module` function.
In this vignette we will focus on using the `teal_transform_module` for transforming the input data using the `transformators` argument in `teal::module` function.

## Creating a data transformation module

Expand Down
6 changes: 3 additions & 3 deletions vignettes/transform-module-output.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ If change of this magnitude is required, it is recommended to create a new modul

## Building Output Transformations (Decorators)

For the sake of simplicity, we will name the output transformers as **decorators** in code examples below.
For simplicity, we will refer to the output transformers as **decorators** in the code examples below.

### Server

Here we create a simple transformator that does not provide user input.
Here we create a simple transformator that does not provide any user input.
Knowing that the module contains an object of class `ggplot2` named `plot`, we will modify its title and x-axis title:

```{r static_decorator}
Expand All @@ -78,7 +78,7 @@ static_decorator <- teal_transform_module(

### UI

If the transformation requires user input, a `ui` function can be added.
If the transformation requires a user input, a `ui` function can be added.
Here, the x-axis title is obtained from a `textInput` widget, giving the user some flexibility.
Note how the input values are passed to the `within()` function using its `...` argument.
See `?teal.code::within.qenv` for more examples.
Expand Down

0 comments on commit c1314dc

Please sign in to comment.