Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server <- function(input, output) {
- output$plot <- renderPlot({
- file1 <- input$file1
- file2 <- input$file2
- if (is.null(file1) && is.null(file2))
- return(NULL)
- if (!is.null(file1)) {
- in2 <- pdf_text(file1$datapath)
- }
- if (!is.null(file2)) {
- in2 <- readLines(file2$datapath)
- }
- ui <- shinyUI(fluidPage(
- titlePanel("Textmining Tool v0.1"),
- sidebarLayout(
- sidebarPanel(
- fileInput('file1', 'Choose PDF',
- accept = c('text/pdf',
- '.pdf')),
- fileInput(
- 'file2',
- 'Choose TXT,CSV', multiple = T,
- accept = c(
- 'text/csv',
- 'text/comma-separated-values',
- 'text/tab-separated-values',
- 'text/plain',
- '.csv',
- '.tsv'
- )
- ),
- fileInput(
- 'pos',
- 'Choose pos',
- accept = c(
- 'text/csv',
- 'text/comma-separated-values',
- 'text/tab-separated-values',
- 'text/plain',
- '.csv',
- '.tsv'
- )
- ),
- fileInput(
- 'neg',
- 'Choose neg',
- accept = c(
- 'text/csv',
- 'text/comma-separated-values',
- 'text/tab-separated-values',
- 'text/plain',
- '.csv',
- '.tsv'
- )
- ),
- sliderInput(
- "freq",
- "Minimum Frequency:",
- min = 1,
- max = 50,
- value = 15
- ),
- sliderInput(
- "max",
- "Maximum Number of Words:",
- min = 1,
- max = 300,
- value = 100
- ),
- textInput("v", "Input correlation word", "")
- ),
- mainPanel(
- tabsetPanel(
- type = "pills",
- tabPanel("Wordcloud", plotOutput("plot")),
- tabPanel("Wordcorrelation",DT::dataTableOutput("table")),
- tabPanel("Sentimentanalysys", textOutput("sent")),
- tabPanel("Most Frequent", DT::dataTableOutput("2"))
- )
- )
- )
- ))
Add Comment
Please, Sign In to add comment