Re: [R] Add wrapper to Shiny in R package

2017-09-21 Thread Duncan Murdoch
On 21/09/2017 11:30 AM, Axel Urbiz wrote: Thank you Thierry. I'm trying to following your suggestion in the example below, but getting: Error in get("xs", envir = my.env) : object 'my.env' not found. library(shiny) library(shinydashboard) myApp <- function(x, ...) { xs <- scale(x)

Re: [R] Add wrapper to Shiny in R package

2017-09-21 Thread Axel Urbiz
Thank you Thierry. I'm trying to following your suggestion in the example below, but getting: Error in get("xs", envir = my.env) : object 'my.env' not found. library(shiny) library(shinydashboard) myApp <- function(x, ...) { xs <- scale(x) my.env <- new.env() assign("xs", xs, envir =

Re: [R] Add wrapper to Shiny in R package

2017-09-21 Thread Jeff Newmiller
... which begs the question... how does the my.env variable get from the myApp function into the server function? Perhaps read [1]? [1] https://shiny.rstudio.com/articles/function.html -- Sent from my phone. Please excuse my brevity. On September 21, 2017 8:13:15 AM PDT, Thierry Onkelinx

Re: [R] Add wrapper to Shiny in R package

2017-09-21 Thread Thierry Onkelinx
Dear Axel, I've used environment for such problems. assign("xs", xs, envir = my.env) in the myApp function get("xs", envir = my.env) in the server function Best regards, ir. Thierry Onkelinx Statisticus/ Statiscian Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN