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

712 - {shinytest2} for tm_g_bivariate #720

Merged
merged 39 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3064cbb
feat: add shinytest2 tests for `tm_g_bivariate`
vedhav Apr 11, 2024
b63f52f
chore: move app driver initialiation to a function and add pkg prefix
vedhav Apr 12, 2024
ebe6535
chore: add pkg prefix
vedhav Apr 12, 2024
3b3a525
chore: remove `module()`
vedhav Apr 12, 2024
2c0348e
chore: update docs
vedhav Apr 12, 2024
1104deb
feat: add more test cases
vedhav Apr 12, 2024
ed13a95
docs: fix lint error
vedhav Apr 12, 2024
bf3fc10
chore: move `facet_ggplot_call` to utils
vedhav Apr 15, 2024
696c766
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
dependabot-preview[bot] Apr 15, 2024
33fd26c
chore: add pkg prefix to some tests
vedhav Apr 15, 2024
53049d4
fix: remove debug browser statement
vedhav Apr 15, 2024
9deb0fc
docs: remove unused doc
vedhav Apr 15, 2024
9b2d2f8
fix: workaround problem with ggplot2
averissimo Apr 15, 2024
1c64e6f
chore: fix lint error
vedhav Apr 15, 2024
bb722be
fix: linter problem
averissimo Apr 15, 2024
7a5073e
docs: adds comments to new init function
averissimo Apr 15, 2024
704e494
fix: allow to run init_app_driver on interactive
averissimo Apr 15, 2024
44448da
fix: introduces changes after tmg discussion
averissimo Apr 16, 2024
9662dd7
Merge branch 'main' into 712-tm_g_bivariate@main
averissimo Apr 17, 2024
1fb452d
chore: revert prefix of ggplot2
averissimo Apr 17, 2024
afa218f
fix: upstream method rename
averissimo Apr 17, 2024
cd130f3
chore: revert prefix of ggplot2
averissimo Apr 17, 2024
d066a22
fix: linter errors
averissimo Apr 17, 2024
fcf58fe
rename app to app_driver
m7pr Apr 18, 2024
8a5b7cb
use active_module_element
m7pr Apr 18, 2024
9f27f0f
[skip style] [skip vbump] Restyle files
github-actions[bot] Apr 18, 2024
5d8a4d1
add few more parameters
m7pr Apr 18, 2024
256bca2
Merge branch '712-tm_g_bivariate@main' of https://github.com/insights…
m7pr Apr 18, 2024
96fcd3e
Merge branch 'main' into 712-tm_g_bivariate@main
m7pr Apr 19, 2024
fdc43c8
extend tests with coloring panel
m7pr Apr 19, 2024
66ec9bf
extend setting encoding with color, size and fill
m7pr Apr 19, 2024
ec66906
[skip style] [skip vbump] Restyle files
github-actions[bot] Apr 19, 2024
cbf55b0
Merge branch '712-tm_g_bivariate@main' of https://github.com/insights…
m7pr Apr 19, 2024
0aaea61
Empty-Commit
m7pr Apr 19, 2024
1be13f7
Merge branch 'main' into 712-tm_g_bivariate@main
m7pr Apr 19, 2024
b2260d0
Merge branch 'main' into 712-tm_g_bivariate@main
averissimo Apr 19, 2024
2e56413
chore: remove prefix that is no longer necessary
averissimo Apr 19, 2024
fc3f9c8
chore: add some custom parameters
averissimo Apr 19, 2024
90ab7ed
Merge branch 'main' into 712-tm_g_bivariate@main
averissimo Apr 19, 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
168 changes: 84 additions & 84 deletions R/tm_g_bivariate.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,52 +56,49 @@
#' CO2 <- data.frame(CO2)
#' })
#' datanames(data) <- c("CO2")
#' join_keys(data) <- default_cdisc_join_keys[datanames(data)]
#'
#' app <- init(
#' data = data,
#' modules = modules(
#' tm_g_bivariate(
#' x = data_extract_spec(
#' dataname = "CO2",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["CO2"]]),
#' selected = "conc",
#' fixed = FALSE
#' )
#' ),
#' y = data_extract_spec(
#' dataname = "CO2",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["CO2"]]),
#' selected = "uptake",
#' multiple = FALSE,
#' fixed = FALSE
#' )
#' ),
#' row_facet = data_extract_spec(
#' dataname = "CO2",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["CO2"]]),
#' selected = "Type",
#' fixed = FALSE
#' )
#' ),
#' col_facet = data_extract_spec(
#' dataname = "CO2",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["CO2"]]),
#' selected = "Treatment",
#' fixed = FALSE
#' )
#' ),
#' ggplot2_args = ggplot2_args(
#' labs = list(subtitle = "Plot generated by Bivariate Module")
#' modules = tm_g_bivariate(
#' x = data_extract_spec(
#' dataname = "CO2",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["CO2"]]),
#' selected = "conc",
#' fixed = FALSE
#' )
#' ),
#' y = data_extract_spec(
#' dataname = "CO2",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["CO2"]]),
#' selected = "uptake",
#' multiple = FALSE,
#' fixed = FALSE
#' )
#' ),
#' row_facet = data_extract_spec(
#' dataname = "CO2",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["CO2"]]),
#' selected = "Type",
#' fixed = FALSE
#' )
#' ),
#' col_facet = data_extract_spec(
#' dataname = "CO2",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["CO2"]]),
#' selected = "Treatment",
#' fixed = FALSE
#' )
#' ),
#' ggplot2_args = ggplot2_args(
#' labs = list(subtitle = "Plot generated by Bivariate Module")
#' )
#' )
#' )
Expand All @@ -121,48 +118,46 @@
#'
#' app <- init(
#' data = data,
#' modules = modules(
#' tm_g_bivariate(
#' x = data_extract_spec(
#' dataname = "ADSL",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["ADSL"]]),
#' selected = "AGE",
#' fixed = FALSE
#' )
#' ),
#' y = data_extract_spec(
#' dataname = "ADSL",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["ADSL"]]),
#' selected = "SEX",
#' multiple = FALSE,
#' fixed = FALSE
#' )
#' ),
#' row_facet = data_extract_spec(
#' dataname = "ADSL",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["ADSL"]]),
#' selected = "ARM",
#' fixed = FALSE
#' )
#' ),
#' col_facet = data_extract_spec(
#' dataname = "ADSL",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["ADSL"]]),
#' selected = "COUNTRY",
#' fixed = FALSE
#' )
#' ),
#' ggplot2_args = ggplot2_args(
#' labs = list(subtitle = "Plot generated by Bivariate Module")
#' modules = tm_g_bivariate(
#' x = data_extract_spec(
#' dataname = "ADSL",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["ADSL"]]),
#' selected = "AGE",
#' fixed = FALSE
#' )
#' ),
#' y = data_extract_spec(
#' dataname = "ADSL",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["ADSL"]]),
#' selected = "SEX",
#' multiple = FALSE,
#' fixed = FALSE
#' )
#' ),
#' row_facet = data_extract_spec(
#' dataname = "ADSL",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["ADSL"]]),
#' selected = "ARM",
#' fixed = FALSE
#' )
#' ),
#' col_facet = data_extract_spec(
#' dataname = "ADSL",
#' select = select_spec(
#' label = "Select variable:",
#' choices = variable_choices(data[["ADSL"]]),
#' selected = "COUNTRY",
#' fixed = FALSE
#' )
#' ),
#' ggplot2_args = ggplot2_args(
#' labs = list(subtitle = "Plot generated by Bivariate Module")
#' )
#' )
#' )
Expand Down Expand Up @@ -666,7 +661,12 @@ srv_g_bivariate <- function(id,
expr = {
# Add facetting labels
# optional: grid.newpage() # nolint: commented_code.
p <- add_facet_labels(p, xfacet_label = nulled_col_facet_name, yfacet_label = nulled_row_facet_name)
# Prefixed with teal.modules.general as its usage will appear in "Show R code"
p <- teal.modules.general::add_facet_labels(
p,
xfacet_label = nulled_col_facet_name,
yfacet_label = nulled_row_facet_name
)
grid::grid.newpage()
grid::grid.draw(p)
},
Expand Down
161 changes: 78 additions & 83 deletions man/tm_g_bivariate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading