gadgets_developer: Functions to implement AnVIL gadget interfaces

.gadget_runR Documentation

Functions to implement AnVIL gadget interfaces


Functions documented on this page are primarily intended for package developers wishing to implement gadgets (graphical interfaces) to navigating AnVIL-generated tables.

.gadget_run() presents the user with a tibble-navigating gadget, returning the value of DONE_FUN if a row of the tibble is selected, or NULL.


.gadget_run(title, tibble, DONE_FUN)



character(1) (required) title to appear at the base of the gadget, e.g., "AnVIL Workspaces".


a tibble or data.frame to be displayed in the gadget.


a function of two arguments, tibble and row_selected. The tibble is the tibble provided as an argument to .gadget_run(). row_selected is the row selected in the gadget by the user. The function is only invoked when the user selects a valid row.


.gadget_run() returns the result of DONE_FUN() if a row has been selected by the user, or NULL if no row is selected (the user presses Cancel, or Done prior to selecting any row).


## Not run: 
tibble <- avworkspaces()
DONE_FUN <- function(tibble, row_selected) {
    selected <- slice(tibble, row_selected)
    with(selected, paste0(namespace, "/", name))
.gadget_run("AnVIL Example", tibble, DONE_FUN)

## End(Not run)

Bioconductor/AnVIL documentation built on Feb. 16, 2024, 1:47 a.m.