Skip to content
Open

picks #942

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
12f095c
WIP
gogonzo Nov 5, 2024
d348719
brush_filter to the module
gogonzo Nov 5, 2024
947f151
encapsulate brushing functionality
gogonzo Nov 5, 2024
842ba1b
fix add filter state
gogonzo Nov 5, 2024
a9c9b06
scatterplot + data_table
gogonzo Nov 6, 2024
bf7b4c4
Merge branch 'main' into spotfire_poc2
gogonzo Nov 8, 2024
4b987a6
WIP
gogonzo Nov 15, 2024
089a06a
add data_table module to the app
gogonzo Nov 15, 2024
e0969da
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
dependabot-preview[bot] Nov 15, 2024
c5c744d
remove unneeded
gogonzo Nov 15, 2024
67d4a5c
wip
gogonzo Nov 19, 2024
70d0772
quick fix
gogonzo Nov 19, 2024
2e49a7a
generalise to enable faceting
gogonzo Nov 19, 2024
4038ba8
dummy adam example
gogonzo Nov 19, 2024
06bf0a4
feat: add example using the poc data
vedhav Nov 19, 2024
b9e03c2
WIP plotly
gogonzo Nov 21, 2024
32ee42f
plotly_specs as simple list
gogonzo Nov 21, 2024
4321350
data_table as a brushing table
gogonzo Nov 21, 2024
4137aa1
hide table when not brushed
gogonzo Nov 21, 2024
f1b5d51
feat: allow the user to pass custom colors and symbols
vedhav Nov 21, 2024
780924c
feat: reproduce the osprey example
vedhav Nov 22, 2024
ea559d3
fix: filter using teal.slice and not during data creation
vedhav Nov 22, 2024
21eff43
rename srv_page_data_table to srv_data_table
Nov 22, 2024
ea67bd0
feat: add refrence lines + filter unwanted data
vedhav Nov 22, 2024
f913acb
display brushed only
gogonzo Nov 22, 2024
7d5bc89
push local changes
vedhav Nov 28, 2024
179f145
export the custom module for deployment
vedhav Nov 28, 2024
e18dfc3
pass plotly_selected only when it is supported
vedhav Nov 28, 2024
b5884a2
feat: use reactable
vedhav Dec 2, 2024
ef85449
fix: avoid ns clash of layout
vedhav Dec 2, 2024
ef8a5ab
chore: remove local change
vedhav Dec 2, 2024
0fff2a7
feat: use main version of teal and update spiderplot module
vedhav Dec 3, 2024
b8a60c3
feat: update the spiderplot tables + UI enhancements + single parent
vedhav Dec 4, 2024
17e74e3
fix: format the links in two tables
vedhav Dec 4, 2024
d2636fb
feat: add a two module POC for easy maintenance
vedhav Dec 6, 2024
b63249a
Merge branch 'main' into poc3@spotfire_poc2
gogonzo Feb 13, 2025
915ffdf
WIP modules
Feb 14, 2025
d028c8e
labels to the data
gogonzo Feb 14, 2025
78e1f2a
fix
Feb 14, 2025
2c94370
add reactable module
gogonzo Feb 14, 2025
4f62e13
wip modularize
Feb 14, 2025
2065b71
autolabels
Feb 14, 2025
7b5ed64
further abstraction
Feb 17, 2025
7426193
fixes
Feb 17, 2025
c398ee8
swimlane module wip
Feb 17, 2025
e68d78f
further changes .adjust_colors
Feb 28, 2025
0cd5adc
recent
Mar 5, 2025
1596f2d
update the app code
vedhav Mar 5, 2025
bb0917c
WIP waterfall
gogonzo Mar 5, 2025
ef300f5
update
Mar 6, 2025
3536699
namespace fix
Mar 6, 2025
3eb068a
swimlane with tabs
Mar 6, 2025
cfbabc2
poc_onco_v1
Mar 6, 2025
bea4996
WIP
Mar 11, 2025
2f598c8
Merge branch 'main' into poc3@spotfire_poc2
gogonzo Mar 11, 2025
b496a7e
swimlane fix shapes and fct order
Mar 11, 2025
7590be1
wip
Mar 12, 2025
cabb695
fix reactables reactivity
gogonzo Mar 12, 2025
29517c8
sort input swimlane
Mar 12, 2025
246bfb2
v3
Mar 12, 2025
9d51de3
v4
Mar 13, 2025
b1e4f60
wip
Mar 13, 2025
9c37a22
freeze column
Mar 14, 2025
cf14bcf
wip v5
Mar 17, 2025
bf0cbad
wip v5
Mar 17, 2025
e9ac824
wip v5
Mar 17, 2025
165d891
wip v5
Mar 18, 2025
607105a
spiderplot lines blue
Mar 18, 2025
cb5c616
wip v5
Mar 18, 2025
18fd08c
wip v5
Mar 18, 2025
02040a5
wip v5
Mar 18, 2025
b926f35
wip v5
Mar 18, 2025
4495bc7
major cleaning
Mar 25, 2025
ae795f8
minor fix
Mar 25, 2025
c6e44f5
major cleaning
Mar 25, 2025
08465f6
add graphs to the namespace
Mar 25, 2025
b6ed653
tm_rmarkdown
Mar 28, 2025
a128ff7
tm_rmarkdown
Mar 28, 2025
bc1b4ad
tm_rmarkdown
Mar 28, 2025
2bbbb96
choices selected
Apr 2, 2025
8234f77
update
Apr 2, 2025
7a26589
chore: format package
vedhav May 2, 2025
0c2e874
fix: handle color and shape edge cases + rename `event_var` param in …
vedhav May 2, 2025
a065bf5
docs: add examples
vedhav May 2, 2025
589afce
feat: allow the app developer to customize tooltips using column names
vedhav May 5, 2025
4dd1b59
feat: allow custome siize based on a column + expand cards
vedhav May 7, 2025
ce441c3
docs: update roxygen docs for new params
vedhav May 7, 2025
a840f29
feat: add the show selected tooltips module
vedhav May 9, 2025
68d212f
feat: improve the trigger tooltips
vedhav May 14, 2025
8a364bd
fix: remove unused param
vedhav May 14, 2025
4d41676
feat: simplify the trigger tooltip logic
vedhav May 16, 2025
00b5cf8
[skip style] [skip vbump] Restyle files
github-actions[bot] May 16, 2025
723c084
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] May 16, 2025
4126c6b
feat: implement the subject selection for spiider plot
vedhav May 16, 2025
25f7aac
feat: modify the point_size to work like point_colors and point_symbols
vedhav May 29, 2025
1a7951f
Merge branch 'main' into poc3@spotfire_poc2
vedhav Aug 20, 2025
1a82823
chore: fix errors in module
vedhav Aug 20, 2025
0092add
feat: decouple the plot functions and rename module functions
vedhav Aug 27, 2025
93bc7d9
fix: update docs and namespace
vedhav Aug 28, 2025
392c394
chore: rename internal functions too
vedhav Aug 28, 2025
c338ea0
feat: add the new scatterplot module
vedhav Aug 28, 2025
95310d3
chore: add pkg namespace
vedhav Aug 28, 2025
de3b770
fix: stop using internal functions inside the qenv
vedhav Aug 29, 2025
f4a13ef
feat: add MVP version of line and barplot
vedhav Sep 2, 2025
9ad1397
fix: add pkg namespace
vedhav Sep 2, 2025
1a42f2a
fix: move filter out of args into transformators
vedhav Sep 2, 2025
d2b2ff0
feat: add lines to the scatterplot
vedhav Sep 2, 2025
0613aea
fix: fix error when `sort_var` is not specified in `tm_p_swimlane`
vedhav Sep 2, 2025
620f74f
chore: remove subject selection tooltip
vedhav Sep 2, 2025
7acd618
chore: remove print
vedhav Sep 2, 2025
2cc3595
docs: add func docs
vedhav Sep 3, 2025
624bbd7
fix: remove unwanted data grouping
vedhav Sep 3, 2025
4889032
fix: ungroup before plot
vedhav Sep 3, 2025
0be199b
fix: retain the labels for grouped vars and color var
vedhav Sep 3, 2025
1e5be80
feat: add a poc of a module that uses multiple modules
vedhav Sep 4, 2025
8e338ac
feat: hide widgets using module arg
vedhav Sep 4, 2025
e144900
feat: hide widgets using module arg
vedhav Sep 4, 2025
eb0f489
feat: hide widgets from the module
vedhav Sep 4, 2025
d660198
fix: add pkg prefix for code reproducibility
vedhav Sep 4, 2025
f9f5bf9
only join when there's a record
Sep 7, 2025
6bcd1f5
feat: move table outside swimlane
vedhav Sep 8, 2025
66e980e
feat: apply filter logic for the table
vedhav Sep 9, 2025
00eff7d
Merge remote-tracking branch 'origin/main' into submodules@poc3@spotf…
vedhav Sep 10, 2025
cb5e725
spiderplot with `picks`
gogonzo Sep 11, 2025
8c251ed
feat: add spaghetti plot module + improve scatter and line plot modules
vedhav Sep 12, 2025
882823f
Merge branch 'submodules@poc3@spotfire_poc2' into redesign_extraction…
vedhav Sep 12, 2025
848e89b
fix: use package prefix `layout` is exported in graphics, igraph, and…
vedhav Sep 12, 2025
636a0cd
fix: use package prefix `layout` is exported in graphics, igraph, and…
vedhav Sep 12, 2025
f14992e
typo
vedhav Sep 12, 2025
6d42589
Merge branch 'submodules@poc3@spotfire_poc2' into redesign_extraction…
vedhav Sep 12, 2025
210cb1b
chore: remove local log
vedhav Sep 12, 2025
027b58b
Merge branch 'submodules@poc3@spotfire_poc2' into redesign_extraction…
vedhav Sep 12, 2025
fe7be25
chore: remove legacy subject tooltip triggers
vedhav Sep 12, 2025
86a58d1
Merge branch 'submodules@poc3@spotfire_poc2' into redesign_extraction…
vedhav Sep 12, 2025
d647ee1
feat: improve bargraph and add double_bargraph module
vedhav Sep 15, 2025
6d4a216
Merge branch 'submodules@poc3@spotfire_poc2' into redesign_extraction…
vedhav Sep 15, 2025
4b0a1a7
docs: rename double bargraph to drilldown bargraph + add docs
vedhav Sep 15, 2025
565b100
Merge branch 'submodules@poc3@spotfire_poc2' into redesign_extraction…
vedhav Sep 15, 2025
a78a083
fix: update examples with `tooltip_vars` usage and fix errors related…
vedhav Sep 15, 2025
eb11ff6
Merge branch 'submodules@poc3@spotfire_poc2' into redesign_extraction…
vedhav Sep 15, 2025
b5d04e2
feat: add the ability to customize tooltips in bargraph
vedhav Sep 16, 2025
f041216
Merge branch 'submodules@poc3@spotfire_poc2' into redesign_extraction…
vedhav Sep 16, 2025
e07755f
update
gogonzo Sep 16, 2025
d04c116
feat: move the mdr modules outside tmg + split waterfall module
vedhav Sep 16, 2025
40aedde
Merge branch 'submodules@poc3@spotfire_poc2' into redesign_extraction…
vedhav Sep 16, 2025
0edbeb6
fix scatter and lineplot
Sep 16, 2025
0a88128
picks to spaghetti
Sep 16, 2025
b8eb22a
fixes
Sep 16, 2025
3e3acb7
fix some modules
gogonzo Sep 23, 2025
61b2cfd
minor
gogonzo Sep 23, 2025
a353348
Merge remote-tracking branch 'origin/main' into redesign_extraction@main
gogonzo Sep 23, 2025
8764312
link remotes
gogonzo Sep 23, 2025
52a492b
validate_input
gogonzo Sep 24, 2025
ccf0d8d
fix validation when >1 x vars selected and plot Response vs Regressor
gogonzo Sep 24, 2025
6ec2fb7
update
gogonzo Sep 24, 2025
2049b98
tm_distribution ready
gogonzo Oct 1, 2025
eb65be4
tmg is using picks
gogonzo Oct 7, 2025
c3e8381
rename files so that .default is still in the original file
gogonzo Oct 9, 2025
ea0bae0
roxy
gogonzo Oct 9, 2025
460cb36
Merge branch 'main' into redesign_extraction@main
gogonzo Oct 9, 2025
a71bb7f
remove src
gogonzo Oct 9, 2025
43c914a
Merge branch 'main' into redesign_extraction@main
gogonzo Oct 20, 2025
7ec893d
update docs
gogonzo Oct 20, 2025
c91a8ee
rename mathods in teal.transform
gogonzo Oct 21, 2025
fbab319
spec -> picks
gogonzo Oct 24, 2025
d05d134
Merge branch 'main' into redesign_extraction@main
gogonzo Oct 29, 2025
53da6a5
wip
gogonzo Oct 29, 2025
00c7e24
Merge remote-tracking branch 'origin/main' into redesign_extraction@main
gogonzo Oct 30, 2025
f8b884f
[skip style] [skip vbump] Restyle files
github-actions[bot] Oct 30, 2025
f7b6c2c
cleanup
gogonzo Oct 31, 2025
5cf93d7
remove values() after variables(multiple = TRUE)
gogonzo Nov 3, 2025
2556fae
remove values() after variables(multiple = TRUE)
gogonzo Nov 3, 2025
b092e25
revert unnecessary differences with main
gogonzo Nov 3, 2025
8cbcebf
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Nov 3, 2025
7e0558b
change teal.transform to teal.picks in DESCRIPTION file
m7pr Mar 4, 2026
8186147
change teal.transform:: to teal.picks::
m7pr Mar 4, 2026
81aea6f
keep teal.transform at main branch in Remotes
m7pr Mar 5, 2026
aaaab4a
Merge remote-tracking branch 'origin/main' into redesign_extraction@main
averissimo Jul 10, 2026
38d9d22
fix: decorate
averissimo Jul 10, 2026
6f313fd
Add new arguments as they are used on the method
llrs-roche Jul 14, 2026
47b6cac
Use the existing method for the function
llrs-roche Jul 14, 2026
c13bfd4
Avoid internal help pages
llrs-roche Jul 14, 2026
d7db07b
Fix mismatch between definition and usage
llrs-roche Jul 14, 2026
d882b0b
Import from teal instead of from the namespace
llrs-roche Jul 14, 2026
854dc3f
Add lattice dependency
llrs-roche Jul 14, 2026
2232419
Declare what we import from forcats
llrs-roche Jul 14, 2026
65ef3c0
Import tidyselect for all the picks selections
llrs-roche Jul 14, 2026
efe937a
Add back the description of the argument default_outlier_label
llrs-roche Jul 14, 2026
f05db92
Add tidyselect on the imports
llrs-roche Jul 14, 2026
7aa229a
Make methods match definitions
llrs-roche Jul 14, 2026
822256a
Fix NOTES about undefined variables and functions
llrs-roche Jul 14, 2026
786a98a
Import tail
llrs-roche Jul 14, 2026
2a18558
Fix style
llrs-roche Jul 14, 2026
be16090
Remove exported function as per NEWS
llrs-roche Jul 14, 2026
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
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Depends:
R (>= 4.1),
shiny (>= 1.8.1),
teal (>= 1.2.0),
teal.picks (>= 0.1.0),
teal.transform (>= 0.7.0)
Imports:
bslib (>= 0.8.0),
Expand All @@ -46,9 +47,11 @@ Imports:
gridExtra (>= 2.3),
htmlwidgets (>= 1.6.4),
jsonlite (>= 1.8.9),
lattice,
lifecycle (>= 0.2.0),
MASS (>= 7.3-60),
patchwork (>= 1.2.0),
rlang,
rmarkdown (>= 2.23),
rtables (>= 0.6.11),
scales (>= 1.3.0),
Expand All @@ -67,14 +70,14 @@ Imports:
tern (>= 0.9.7),
tibble (>= 2.0.0),
tidyr (>= 0.8.3),
tidyselect,
tools,
utils
Suggests:
knitr (>= 1.42),
logger (>= 0.4.0),
nestcolor (>= 0.1.0),
pkgload,
rlang (>= 1.0.0),
roxy.shinylive,
rvest,
shinytest2,
Expand Down
29 changes: 29 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ S3method(create_sparklines,factor)
S3method(create_sparklines,logical)
S3method(create_sparklines,numeric)
S3method(teal.reporter::to_rmd,markdown_internal)
S3method(tm_a_pca,default)
S3method(tm_a_pca,picks)
S3method(tm_a_regression,default)
S3method(tm_a_regression,picks)
S3method(tm_g_association,default)
S3method(tm_g_association,picks)
S3method(tm_g_bivariate,default)
S3method(tm_g_bivariate,picks)
S3method(tm_g_distribution,default)
S3method(tm_g_distribution,picks)
S3method(tm_g_response,default)
S3method(tm_g_response,picks)
S3method(tm_g_scatterplot,default)
S3method(tm_g_scatterplot,picks)
S3method(tm_g_scatterplotmatrix,default)
S3method(tm_g_scatterplotmatrix,picks)
S3method(tm_t_crosstable,default)
S3method(tm_t_crosstable,picks)
S3method(tools::toHTML,markdown_internal)
export(add_facet_labels)
export(geom_mosaic)
Expand All @@ -32,6 +50,17 @@ import(ggplot2)
import(shiny)
import(teal)
import(teal.transform)
import(tidyselect)
importFrom(dplyr,"%>%")
importFrom(dplyr,.data)
importFrom(forcats,fct_infreq)
importFrom(forcats,fct_na_value_to_level)
importFrom(forcats,fct_rev)
importFrom(lattice,current.panel.limits)
importFrom(lattice,panel.splom)
importFrom(lattice,panel.text)
importFrom(lattice,splom)
importFrom(lifecycle,deprecated)
importFrom(rlang,":=")
importFrom(teal,validate_input)
importFrom(utils,tail)
1 change: 1 addition & 0 deletions R/geom_mosaic.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ StatMosaic <- ggplot2::ggproto( # nolint: object_name_linter.
#' left or right for y axes, top or bottom for x axes.
#' @param ... other arguments passed to `continuous_scale()`.
#' @keywords internal
#' @noRd
.scale_x_mosaic <- function(breaks = unique,
minor_breaks = NULL,
labels = unique,
Expand Down
16 changes: 16 additions & 0 deletions R/picks-datanames.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.picks_datanames <- function(x) {
checkmate::assert_list(x, c("picks", "NULL"))
datanames_list <- lapply(x, function(x) {
if (is.character(x$datasets$choices)) {
x$datasets$choices
} else {
NULL
}
})

if (any(vapply(datanames_list, is.null, logical(1)))) {
"all"
} else {
unique(unlist(datanames_list))
}
}
65 changes: 41 additions & 24 deletions R/tm_a_pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
#'
#' @inheritParams teal::module
#' @inheritParams shared_params
#' @param dat (`data_extract_spec` or `list` of multiple `data_extract_spec`)
#' specifying columns used to compute PCA.
#' @param dat (`picks`) specifying columns used to compute PCA.
#' @param font_size (`numeric`) optional, specifies font size.
#' It controls the font size for plot titles, axis labels, and legends.
#' - If vector of `length == 1` then the font sizes will have a fixed size.
Expand Down Expand Up @@ -67,16 +66,13 @@
#' modules = modules(
#' tm_a_pca(
#' "PCA",
#' dat = data_extract_spec(
#' dataname = "USArrests",
#' select = select_spec(
#' choices = variable_choices(
#' data = data[["USArrests"]], c("Murder", "Assault", "UrbanPop", "Rape")
#' ),
#' dat = teal.picks::picks(
#' datasets("USArrests"),
#' teal.picks::variables(
#' choices = c("Murder", "Assault", "UrbanPop", "Rape"),
#' selected = c("Murder", "Assault"),
#' multiple = TRUE
#' ),
#' filter = NULL
#' )
#' )
#' )
#' )
Expand All @@ -103,17 +99,13 @@
#' data = data,
#' modules = modules(
#' tm_a_pca(
#' "PCA",
#' dat = data_extract_spec(
#' dataname = "ADSL",
#' select = select_spec(
#' choices = variable_choices(
#' data = data[["ADSL"]], c("BMRKR1", "AGE", "EOSDY")
#' ),
#' dat = teal.picks::picks(
#' datasets("ADSL"),
#' teal.picks::variables(
#' choices = c("BMRKR1", "AGE", "EOSDY"),
#' selected = c("BMRKR1", "AGE"),
#' multiple = TRUE
#' ),
#' filter = NULL
#' )
#' )
#' )
#' )
Expand All @@ -125,7 +117,14 @@
#' @export
#'
tm_a_pca <- function(label = "Principal Component Analysis",
dat,
dat = teal.picks::picks(
teal.picks::datasets(),
teal.picks::variables(
choices = tidyselect::where(~ is.numeric(.x) && all(!is.na(.x))),
selected = tidyselect::everything(),
multiple = TRUE
)
),
plot_height = c(600, 200, 2000),
plot_width = NULL,
ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"),
Expand All @@ -138,6 +137,24 @@
post_output = NULL,
transformators = list(),
decorators = list()) {
UseMethod("tm_a_pca", dat)
}

#' @export
tm_a_pca.default <- function(label = "Principal Component Analysis",
dat,
plot_height = c(600, 200, 2000),
plot_width = NULL,
ggtheme = c("gray", "bw", "linedraw", "light", "dark", "minimal", "classic", "void"),
ggplot2_args = teal.widgets::ggplot2_args(),
rotate_xaxis_labels = FALSE,
font_size = c(12, 8, 20),
alpha = c(1, 0, 1),
size = c(2, 1, 8),
pre_output = NULL,
post_output = NULL,
transformators = list(),
decorators = list()) {
message("Initializing tm_a_pca")

# Normalize the parameters
Expand Down Expand Up @@ -198,8 +215,8 @@

ans <- module(
label = label,
server = srv_a_pca,
ui = ui_a_pca,
server = srv_a_pca.default,
ui = ui_a_pca.default,
ui_args = args,
server_args = c(
data_extract_list,
Expand All @@ -218,7 +235,7 @@
}

# UI function for the PCA module
ui_a_pca <- function(id, ...) {
ui_a_pca.default <- function(id, ...) {

Check warning on line 238 in R/tm_a_pca.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/tm_a_pca.R,line=238,col=1,[object_name_linter] Variable and function name style should match snake_case, symbols, ANL, ADaM or column_names.
ns <- NS(id)
args <- list(...)
is_single_dataset_value <- teal.transform::is_single_dataset(args$dat)
Expand Down Expand Up @@ -347,7 +364,7 @@
}

# Server function for the PCA module
srv_a_pca <- function(id, data, dat, plot_height, plot_width, ggplot2_args, decorators) {
srv_a_pca.default <- function(id, data, dat, plot_height, plot_width, ggplot2_args, decorators) {

Check warning on line 367 in R/tm_a_pca.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/tm_a_pca.R,line=367,col=1,[object_name_linter] Variable and function name style should match snake_case, symbols, ANL, ADaM or column_names.
checkmate::assert_class(data, "reactive")
checkmate::assert_class(isolate(data()), "teal_data")
moduleServer(id, function(input, output, session) {
Expand Down
Loading
Loading