From bbb477629e5bbe20a87b8d480ad146e5059dcc55 Mon Sep 17 00:00:00 2001 From: Jian-Kai Wang Date: Fri, 23 Jun 2017 16:31:00 +0800 Subject: [PATCH] modify app can not run on shiny-server on ubuntu --- readme.md | 6 ++---- tm/global.r | 22 ++++++++++++++++++++++ tm/server.R | 15 --------------- tm/ui.R | 10 +--------- 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/readme.md b/readme.md index 58c8955..57bba21 100644 --- a/readme.md +++ b/readme.md @@ -7,12 +7,10 @@ In the [sophia.dm](https://github.com/jiankaiwang/sophia.dm) project, we try and ### Field : Text Mining --- -* The Text Mining Infrastructure in R - * count-based analysis +* Count-based Text Mining Infrastructure in R [[demo](http://jkw.cloudapp.net:3838/tm/)] * topics * find terms on the frequency * term associations * document listing * main reference - * Ingo Feinerer, Kurt Hornik and David Meyer. (2008) Text Mining Infrastructure in R. *Journal of Statistical Software* Volume 25, Issue 5. - * [demo](http://jkw.cloudapp.net:3838/) \ No newline at end of file + * Ingo Feinerer, Kurt Hornik and David Meyer. (2008) Text Mining Infrastructure in R. *Journal of Statistical Software* Volume 25, Issue 5. \ No newline at end of file diff --git a/tm/global.r b/tm/global.r index ce41f1d..ce2beb1 100644 --- a/tm/global.r +++ b/tm/global.r @@ -1,3 +1,25 @@ +# +# desc : anything necessary librarie or package should be loaded on global.r, not in server.r or ui.r +# + +#install.packages("shiny") +#install.packages("plotly") +#install.packages("ggplot2") +#install.packages("DT") +#install.packages("RCurl") + +library(shiny) +library(plotly) +library(ggplot2) +library(DT) +library(RCurl) + +tryCatch({ + source("tm/sophia.r") +}, warning = function(e) { + source("sophia.r") +}) + # plain-text example processFile = function(filepath) { diff --git a/tm/server.R b/tm/server.R index 4f82faa..505b775 100644 --- a/tm/server.R +++ b/tm/server.R @@ -1,18 +1,3 @@ -#install.packages("shiny") -#install.packages("plotly") -#install.packages("ggplot2") -#install.packages("DT") - -library(shiny) -library(plotly) -library(ggplot2) -library(DT) - -tryCatch({ - source("tm/sophia.r") -}, warning = function(e) { - source("sophia.r") -}) # # desc : get import type diff --git a/tm/ui.R b/tm/ui.R index e057238..dd8c0a0 100644 --- a/tm/ui.R +++ b/tm/ui.R @@ -1,11 +1,3 @@ -#install.packages("shiny") -#install.packages("plotly") -#install.packages("RCurl") - -library(shiny) -library(plotly) -library(RCurl) - # Define UI for application that draws a histogram shinyUI(fluidPage( @@ -36,7 +28,7 @@ shinyUI(fluidPage( href = "http://jkw.cloudapp.net:3838/sophia.dm", span( tags$i(class="fa fa-power-off", `aria-hidden` = "true", class="text-gray"), - span("Demo", class="text-gray") + span("Entry", class="text-gray") ), target = "_blank" )