Skip to content

Instantly share code, notes, and snippets.

@simon-anders
Created August 27, 2020 13:09
Show Gist options
  • Save simon-anders/a576e6edd11364620d69990b4dcc37aa to your computer and use it in GitHub Desktop.
Save simon-anders/a576e6edd11364620d69990b4dcc37aa to your computer and use it in GitHub Desktop.
library( jrc )
library( rlc )
myfun <- function(x) { print( paste( "user clicked on", x ) ) }
rlc::openPage(useViewer=FALSE)
jrc::allowFunctions( "myfun" )
genes <- c( "gene1", "gene2", "gene3" )
lc_html( dat( content = hwriter::hwrite( genes, onclick=sprintf( "jrc.callFunction( 'fun', '%s' )", genes ) ) ) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment