Closed laylagerami closed 3 years ago
Hi, thanks for this great R package.
Trying to get the Chemdoodle viewer to work, this is what I have so far but I get the error
Error in shinyRenderWidget(expr, chemdoodleOutput, env, quoted = TRUE) : object 'chemdoodleOutput' not found
I can see from the renderChemdoodle function that it expects "expr" and "chemdoodleOutput", but it's not clear to me how I should define these? code:
library(shiny) library(chemdoodle) library(htmlwidgets) ui <- fluidPage( # Application title titlePanel("Testing chemdoodle sketcher"), chemdoodle_viewerOutput("chemdoodle") ) server <- function(input, output) { output$chemdoodle = renderChemdoodle( chemdoodle_viewer("c1ccccc1") ) } # Run the application shinyApp(ui = ui, server = server)
I then tried to create a new function called renderChemdoodle_viewer
function (expr, env = parent.frame(), quoted = FALSE) { if (!quoted) { expr <- substitute(expr) } shinyRenderWidget(expr, chemdoodle_viewerOutput, env, quoted = TRUE) }
But in this case, when replacing the "renderChemdoodle" in the above code, the app runs and nothing shows up. Any suggestions on where I am going wrong? Thanks!
You're welcome.
I think the code I just pushed should solve your problem.
Hi, thanks for this great R package.
Trying to get the Chemdoodle viewer to work, this is what I have so far but I get the error
Error in shinyRenderWidget(expr, chemdoodleOutput, env, quoted = TRUE) : object 'chemdoodleOutput' not found
I can see from the renderChemdoodle function that it expects "expr" and "chemdoodleOutput", but it's not clear to me how I should define these? code:
I then tried to create a new function called renderChemdoodle_viewer
But in this case, when replacing the "renderChemdoodle" in the above code, the app runs and nothing shows up. Any suggestions on where I am going wrong? Thanks!