Dear All,
I am trying to upload structure-data file on shiny server using fileInput function in ui.R.
I wish to analyse the uploaded file using another package viz. ChemmineR and the resultant I want again to print on browser.
###############################################################
#My ui.R
library("shiny")
library("ChemmineR")
shinyUI(fluidPage(
titlePanel("SDF input"),
sidebarLayout(
sidebarPanel(
fileInput("file1", "Browse")
),
mainPanel(dataTableOutput('ofile'))
)))
#My server.R
library("shiny")
library("ChemmineR")
shinyServer(function(input,output){
data <- reactive({
read.SDFset(sdfstr=input$file1)
})
output$ofile<- renderDataTable(data())
})
#My console
> runApp('C:/Users/saurav/Dropbox/office/Saurav_Saha_SHIATS/Chemoinformatics_uCARE/analysis/drug_class_based_Classification/r_scripts/web_gui/test')
Warning: Error in seq: trying to get slot "a" from an object of a basic class ("NULL") with no slots
Stack trace (innermost first):
94: seq
93: lapply
92: read.SDFset
91: <reactive:data> [C:\Users\saurav\Dropbox\office\Saurav_Saha_SHIATS\Chemoinformatics_uCARE\analysis\drug_class_based_Classification\r_scripts\web_gui\test/server.R#8]
80: data
79: renderDataTable
78: func
77: origRenderFunc
76: output$ofile
1: runApp
#################################################
Please help. Thanks in advance,
Saurav