Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui.R mapOutput error #169

Open
talassio opened this issue Apr 16, 2015 · 9 comments
Open

ui.R mapOutput error #169

talassio opened this issue Apr 16, 2015 · 9 comments

Comments

@talassio
Copy link

Sourcing launch_app stops with the error:

> launch_app(debug = TRUE, quiet = TRUE)

[1] "dir_app: /home/cesma/R/x86_64-pc-linux-gnu-library/3.1/ohicore/shiny_app"
Error in system.file("libraries", lib, package = package) :
object 'package' not found

Replacing in dir_app/ui.R on line 98

mapOutput('map_container')),

with

chartOutput("map_container", 'leaflet')),

as per ramnathv/rMaps#63
seems that the App works, except no map is drawn.

@jules32
Copy link
Contributor

jules32 commented Apr 16, 2015

Hi @talassio,

Thanks for submitting this issue; we will have to look into this.

Did you clone a repository or are you following steps from http://ohi-science.org/pages/install.html?

@talassio
Copy link
Author

Dear Julia,

I cloned the ecu repository and installed the required packages one by one.

Looking forward to your reply,

best,

Andres

On 16 April 2015 at 17:11, Julia Lowndes [email protected] wrote:

Hi @talassio https://github.com/talassio,

Thanks for submitting this issue; we will have to look into this.

Did you clone a repository or are you following steps from
http://ohi-science.org/pages/install.html?


Reply to this email directly or view it on GitHub
#169 (comment).

@talassio
Copy link
Author

Julia,

as discussed:

list of packages to install from a vanilla system:

install.packages('devtools')
install.packages('psych')
devtools::install_github('ramnathv/rCharts')
devtools::install_github('OHI-Science/ohicore')

please add as required packages in calculate_scores.R:

load MANDATORY required libraries

require(pscych)
require(ohicore)

Cheers

@jules32
Copy link
Contributor

jules32 commented Apr 21, 2015

Hi @talassio,

I have an answer for you. This is what you'll need to install, which I have updated in lines 2-4 of calculate_scores.r. Note that you are installing the dev branch of ohicore; this is important that the @dev is included in the install_github call so that you access our most up-to-date repo.

library(devtools) # install.packages('devtools')
install_github("ohi-science/ohicore@dev")
library(ohicore)

With this, you should not have any more problems with psych and rCharts.

@talassio
Copy link
Author

Marvelous!
On Apr 21, 2015 5:43 AM, "Julia Lowndes" [email protected] wrote:

Hi @talassio https://github.com/talassio,

I have an answer for you. This is what you'll need to install, which I
have updated in lines 2-4 of calculate_scores.r
https://github.com/OHI-Science/gye/blob/draft/region2015/calculate_scores.R#L2-L4.
Note that you are installing the dev branch of ohicore; this is
important that the @dev https://github.com/dev is included in the
install_github call so that you access our most up-to-date repo.

library(devtools) # install.packages('devtools')
install_github("ohi-science/ohicore@dev")
library(ohicore)


Reply to this email directly or view it on GitHub
#169 (comment).

@talassio
Copy link
Author

calculate_scores.R

Just pulled the updated gye repo, and line install_github("ohi-science/ohicore@dev") fails with message

ERROR: dependencyrChartsis not available for packageohicore* removing/home/cesma/R/x86_64-pc-linux-gnu-library/3.2/ohicoreError: Command failed (1)
In addition: Warning message:
packagerChartsis not available (for R version 3.2.0) 

to fix, add devtools::install_github('ramnathv/rCharts') before ohicore@dev

launch_app_codes.R

Also fails, with message

> require(methods)
> launch_app()
Loading required package: shiny
Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘git2r’
Error in loadNamespace(name) : there is no package called ‘git2r’

fix by prepending with
library(git2r)

and finally, launch_app() blows up with

> launch_app()
Error in normalizePath(path, winslash = "/", mustWork = TRUE) : 
  path[1]="github": No such file or directory

hope this helps,

Cheers,
Andrew

@jules32
Copy link
Contributor

jules32 commented Apr 21, 2015

Sorry about this. Thanks for the detail; we are investigating and will get back to you!

@jules32
Copy link
Contributor

jules32 commented Apr 22, 2015

Hi Andrew,

Thanks for your patience. The proper way to install ohicore is to first install the OHI-Science version of rCharts, as in the code below.

I have added a script that you can run that will do this for you: gye/region2015/install_ohicore.r.

Cheers,
Julie

# remove old packages
for (p in c('ohicore','ohigui','rCharts')){
  if (p %in% rownames(installed.packages())){
    lib = subset(as.data.frame(installed.packages()), Package==p, LibPath, drop=T)
    remove.packages(p, lib)
  }
}

# install dependencies
for (p in c('devtools')){
  if (!require(p, character.only=T)){
    install.packages(p)
    require(p, character.only=T)
  }
}

# install packages
install_github('ohi-science/rCharts')
install_github('ohi-science/ohicore@dev')

@talassio
Copy link
Author

Hello Julia,

just followed all the steps and still can't make launch_app_code.R work:

launch_app()
Loading required package: shiny
Error in normalizePath(path, winslash = "/", mustWork = TRUE) :
path[1]="github": No such file or directory

Hope this helps.

Cheers,

Andrew

On 22 April 2015 at 13:10, Julia Lowndes [email protected] wrote:

Hi Andrew,

Thanks for your patience. The proper way to install ohicore is to first
install the OHI-Science version of rCharts, as in the code below.

I have added a script that you can run that will do this for you:
gye/region2015/install_ohicore.r.

Cheers,
Julie

remove old packagesfor (p in c('ohicore','ohigui','rCharts')){

if (p %in% rownames(installed.packages())){
lib = subset(as.data.frame(installed.packages()), Package==p, LibPath, drop=T)
remove.packages(p, lib)
}
}

install dependenciesfor (p in c('devtools')){

if (!require(p, character.only=T)){
install.packages(p)
require(p, character.only=T)
}
}

install packages

install_github('ohi-science/rCharts')
install_github('ohi-science/ohicore@dev')


Reply to this email directly or view it on GitHub
#169 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants