Hi,
Creating shiny applications to visualize plots etc. from R output is very convenient and makes things quite interactive. I am wondering whether there would be a possibility to call these apps from within KNIME using the R scripting tools.
I tried to create a minimal example for a shiny app and pasted this into the R snippet node:
knime.out <- knime.in
library(shiny)
# Define UI ----
library(shiny)
# Define UI ----
ui <- fluidPage(
titlePanel("Test")
)
# Define server logic ----
server <- function(input, output) {
}
# Run the app ----
shinyApp(ui = ui, server = server)
This gives the following error:
ERROR R Snippet 0:7 Execute failed: R evaluation failed.: "knime.tmp.ret<-NULL;printError<-function(e) message(paste('Error:',conditionMessage(e)));for(exp in tryCatch(parse(text=knime.tmp.script),error=printError)){tryCatch(knime.tmp.ret<-withVisible(eval(exp)),error=printError)
if(!is.null(knime.tmp.ret)) {if(knime.tmp.ret$visible) tryCatch(print(knime.tmp.ret$value),error=printError)}};rm(knime.tmp.script,exp,printError);knime.tmp.ret$value"
What do you think? Would it be possible to tweak the KNIME R implementation so that it just opens the app in the browser (similar to the javascript data visualization tools in KNIME).
Thanks a lot!
Cheers,
Fritz