Please i find it difficult to calculate the disimilarity matrix after uploadin a data . i think i first need to make it reactive that i don t know yet . Anyone help please.
shinyServer(function(input, output) {
output$contents <- renderTable({
inFile <- input$file1
if (is.null(inFile))
return(NULL)
read.csv(inFile$datapath, header=input$header, sep=input$sep, quote=input$quote)
})
output$view <- renderTable({
#summary()
})
})
shinyUI(pageWithSidebar(
headerPanel("Solving the quadratic assignment problem using seriation"),
sidebarPanel(
fileInput('file1', 'Choose CSV File',
accept=c('text/csv', 'text/comma-separated-values,text/plain', '.csv')),
tags$hr(),
checkboxInput('header', 'Header', TRUE),
radioButtons('sep', 'Separator',
c(Comma=',',
Semicolon=';',
Tab='\t'),
'Comma'),
radioButtons('quote', 'Quote',
c(None='',
'Double Quote'='"',
'Single Quote'="'"),
'Double Quote')
),
mainPanel(
h4("Data"),
tableOutput('contents'),
h4("Dissimilarity matrix"),
tableOutput("view")
)
))
i need to get the reactive data so as i can calculate the disimilarity .