Problem deploying although package is on CRAN

100 views
Skip to first unread message

Andrew Clark

unread,
Jul 26, 2014, 12:40:13 PM7/26/14
to shinyap...@googlegroups.com

Hi, I was hoping to deploy an app using rlist to shinyapps but got this error

"* Unable to deploy package dependency 'Rstem'
The package was installed locally from source. Only packages
installed from CRAN or GitHub are supported.
Execution halted"

I then installed Rstem from CRAN and loaded separately after rlist but this was not a solution even after restarting the session

any suggestions?

Tareef Kawaf

unread,
Jul 26, 2014, 5:06:32 PM7/26/14
to Andrew Clark, shinyap...@googlegroups.com
Hi Andrew,
Did you try deploying the App again after you installed it from CRAN on your local machine?

-Tareef


--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/d397db37-794a-4d41-bf7e-38a3ef058bc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Clark

unread,
Jul 26, 2014, 5:45:35 PM7/26/14
to shinyap...@googlegroups.com, scott.r...@gmail.com
Well I might have forgotten to that, but not in this instance

Here is sessionInfo(0 in case this helps
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] stringr_0.6.2      shiny_0.10.0       XML_3.98-1.1       sentiment_0.2      Rstem_0.4-1        colorspace_1.2-4   rCharts_0.4.2     
 [8] pipeR_0.3-1        rlist_0.2.3        rvest_0.1          httr_0.3           wordcloud_2.5      RColorBrewer_1.0-5 tm_0.6            
[15] NLP_0.1-3         

loaded via a namespace (and not attached):
 [1] bitops_1.0-6     caTools_1.17     digest_0.6.4     grid_3.1.0       htmltools_0.2.4  httpuv_1.3.0     lattice_0.20-29 
 [8] parallel_3.1.0   plyr_1.8.1       Rcpp_0.11.2      RCurl_1.95-4.1   RJSONIO_1.2-0.2  shinyapps_0.3.55 slam_0.1-32     
[15] tools_3.1.0      whisker_0.3-2    xtable_1.7-3     yaml_2.1.13   

Tareef Kawaf

unread,
Jul 26, 2014, 11:52:13 PM7/26/14
to Andrew Clark, shinyap...@googlegroups.com
Could I trouble you for the URL to your app? Or your username and app name?
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/f3412750-2748-4731-b8ad-58f35fd9003b%40googlegroups.com.

Andrew Clark

unread,
Jul 27, 2014, 12:38:53 AM7/27/14
to shinyap...@googlegroups.com, scott.r...@gmail.com
It's http://pssguy.shinyapps.io/guardianComments. Its a work in progress but I deployed to make sure there were no problems
According to my dashboard it is pending. Only the second I have deployed but the first went smoothly
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-users+unsubscribe@googlegroups.com.
To post to this group, send email to shinyapps-users@googlegroups.com.

Chad Barraford

unread,
Jul 27, 2014, 1:01:54 AM7/27/14
to Andrew Clark, shinyap...@googlegroups.com
Hi andrew, can you try deploying it again? Also, is it possible for your share your source code?


Andrew Clark

unread,
Jul 27, 2014, 2:52:35 AM7/27/14
to shinyap...@googlegroups.com, scott.r...@gmail.com
Tried again. Same error. I see it has now been archived on the dashboard
I'm a bit reluctant to share code currently , mainly because it is a WIP and very messy
I will try a pared down version tomorrow to see if the error persists and get back to you

Andrew Clark

unread,
Jul 27, 2014, 11:29:54 AM7/27/14
to shinyap...@googlegroups.com, scott.r...@gmail.com
OK I pared down the code and appear to have located the issue
Here is thebare bones  code with all the libraries I wish to have in my real app

One problem is adding the 'Rstem' package independently. This is not a problem to remove
The second is the 'sentiment' package which depends on tm and Rstem. If I remove it, the full app works (other than the aspects of the code I need it for)
I tried putting it at head of libraries loaded but that did not help with any deployment

So this appears to identify the exact problem but is there a satisfactory solution?

ui.R

# library(sentiment)
library(tm)
library(wordcloud)
library(httr) # this needs to be loaded after tm as other wise the content function is masked

library(rvest) 
library(rlist)
library(pipeR)
 library(rCharts)
 library(colorspace)

library(XML)
#library(Rstem)



shinyUI(fluidPage(

  sidebarLayout(
    sidebarPanel(

  
    ),

   
    mainPanel(
      dataTableOutput("summaryTable")

      
    )
  )
  

))


server.R
shinyServer(function(input, output) {

  data <- reactive({
    
    inithtml <- content(GET(initURL),"parsed")
   
    tag <-inithtml[xpath("//*/div[@id='d2-root']/@data-discussion-id")][[1]][1][[1]]
    commentURL <- paste0("http://discussion.theguardian.com/discussion/",tag,"?orderby=oldest&per_page=50&commentpage=1#show-all")
    html <- content(GET(commentURL), "parsed")
    
    words <- html[xpath('//*[contains(concat( " ", @class, " " ), concat( " ", "d2-body", " " ))]//text()')] %>>% 
      list.map(
           xmlValue(.,trim = TRUE) %>>% ## so need XML as well m piper The %>>% operator evaluates the function call on the right-hand side with the left-hand side object being the first argument
           strsplit("[^a-zA-Z]") %>>% 
           unlist(use.names = FALSE) %>>%  
           tolower %>>% 
           list.filter(nchar(.) > 3L)) %>>%
           unlist %>>%
           table %>>%
           list.sort(desc(.)
                     ) 
    
    
    df <- data.frame(words)

info=list(df=df)
print(df)
    return(info)
    
  })
  
  

output$summaryTable <- renderDataTable({
  tbl <- data()$df})





})



On Saturday, 26 July 2014 22:01:54 UTC-7, Chad Barraford wrote:

Chad Barraford

unread,
Jul 27, 2014, 12:34:41 PM7/27/14
to Andrew Clark, shinyap...@googlegroups.com
Hey andrew, i don't see an rstem package on CRAN. Am i missing something?


Andrew Clark

unread,
Jul 27, 2014, 1:41:18 PM7/27/14
to shinyap...@googlegroups.com, scott.r...@gmail.com
Rstem. capital R.  got it via the RStudio mirror. But I don't need to have it separtely. It appears to be a sentiment issue

Tareef Kawaf

unread,
Jul 28, 2014, 6:27:51 AM7/28/14
to Andrew Clark, shinyap...@googlegroups.com
Hi Andrew, 
I am not an R expert yet, but it looks like sentiment was removed from CRAN and is now only on R-forge

However I did find that there may be another sentiment package you could use, per the article below.  


Adding support for R-Forge is on our list of things to do, but isn't supported today yet unfortunately.

-Tareef



Andrew Clark

unread,
Jul 28, 2014, 1:08:34 PM7/28/14
to shinyap...@googlegroups.com, scott.r...@gmail.com
Tareef 
 Thanks for suggestion re other sentiment package

Rr CRAN 
 In RStudio / Install Packages/Install from repository CRAN/ Rstem

> install.packages("Rstem")
Installing package into ‘C:/Users/pssguy/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
Content type 'application/zip' length 305471 bytes (298 Kb)
opened URL
downloaded 298 Kb

package ‘Rstem’ successfully unpacked and MD5 sums checked

Andrew Clark

unread,
Jul 31, 2014, 4:22:40 PM7/31/14
to shinyap...@googlegroups.com, scott.r...@gmail.com
In the end, I just extracted the functions I needed from the original sentiment package and pasted them in my app
Seems to work fine
Reply all
Reply to author
Forward
0 new messages