Code Monkey home page Code Monkey logo

rnsf's Introduction

rnsf

Unofficial package to interface with NSF API

rnsf's People

Contributors

bomeara avatar

Watchers

 avatar  avatar

rnsf's Issues

Truncate lines too long in the help

checking Rd line widths ... NOTE
Rd file 'nsf_get_person.Rd':
  \examples lines wider than 100 characters:
     plot(x=range(c(lubridate::mdy(bco$startDate), lubridate::mdy(bco$expDate))), y=range(bco$fundsObligatedAmt), type="n", log="y", bty="n" ... [TRUNCATED]
       lines(x=c(lubridate::mdy(bco$startDate)[grant.index], lubridate::mdy(bco$expDate)[grant.index]), y=rep(bco$fundsObligatedAmt[grant.in ... [TRUNCATED]
       text(x=mean(c(lubridate::mdy(bco$startDate)[grant.index], lubridate::mdy(bco$expDate)[grant.index])), y=as.numeric(bco$fundsObligated ... [TRUNCATED]

Rd file 'nsf_return.Rd':
  \examples lines wider than 100 characters:
     mjs.PI <- sanderson[grepl("Michael J Sanderson",sanderson$pdPIName),] #note the lack of period for middle initial in the search string
     plot(x=lubridate::mdy(mjs.grants$startDate), y=mjs.grants$fundsObligatedAmt, pch=20, log="y", bty="n", xlab="Start date", ylab="Funding ... [TRUNCATED]

failure when trying to install rnsf package with `install_github`

I'm getting the following error

Warning: file ‘grants.rda’ has magic number 'versi'
  Use of save versions prior to 2 is deprecated
Error in load(zfile, envir = envir) :
  bad restore file magic number (file may be corrupted) -- no data loaded
ERROR: lazydata failed for package ‘rnsf’

I browsed a bit and I found that it is recommended to save R package data with devtools::use_data(grants, internal = FALSE), to avoid bad configuration of files.

Here's the whole installation log:

> devtools::install_github("bomeara/rnsf")  # installing package is not working so downloaded data file for now
Downloading GitHub repo bomeara/rnsf@master
from URL https://api.github.com/repos/bomeara/rnsf/zipball/master
Installing rnsf
trying URL 'https://cloud.r-project.org/bin/macosx/el-capitan/contrib/3.5/tm_0.7-5.tgz'
Content type 'application/x-gzip' length 1081502 bytes (1.0 MB)
==================================================
downloaded 1.0 MB

Installing tm
Warning: unable to access index for repository https://datacube.wu.ac.at/bin/macosx/el-capitan/contrib/3.5:
  cannot open URL 'https://datacube.wu.ac.at/bin/macosx/el-capitan/contrib/3.5/PACKAGES'
trying URL 'https://cloud.r-project.org/bin/macosx/el-capitan/contrib/3.5/NLP_0.2-0.tgz'
Content type 'application/x-gzip' length 387932 bytes (378 KB)
==================================================
downloaded 378 KB

Installing NLP
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ  \
  --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/ss/2tpkp325521_kfgn59g44vd80000gn/T/RtmpyqELYw/devtools51d2a9f66b5/NLP'  \
  --library='/Library/Frameworks/R.framework/Versions/3.5/Resources/library'  \
  --install-tests

* installing *binary* package ‘NLP’ ...
* DONE (NLP)
Warning: unable to access index for repository https://datacube.wu.ac.at/bin/macosx/el-capitan/contrib/3.5:
  cannot open URL 'https://datacube.wu.ac.at/bin/macosx/el-capitan/contrib/3.5/PACKAGES'
trying URL 'https://cloud.r-project.org/bin/macosx/el-capitan/contrib/3.5/slam_0.1-43.tgz'
Content type 'application/x-gzip' length 201432 bytes (196 KB)
==================================================
downloaded 196 KB

Installing slam
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ  \
  --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/ss/2tpkp325521_kfgn59g44vd80000gn/T/RtmpyqELYw/devtools51d2a7cd9b0/slam'  \
  --library='/Library/Frameworks/R.framework/Versions/3.5/Resources/library'  \
  --install-tests

* installing *binary* package ‘slam’ ...
* DONE (slam)
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ  \
  --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/ss/2tpkp325521_kfgn59g44vd80000gn/T/RtmpyqELYw/devtools51d4687a2d5/tm'  \
  --library='/Library/Frameworks/R.framework/Versions/3.5/Resources/library'  \
  --install-tests

* installing *binary* package ‘tm’ ...
* DONE (tm)
trying URL 'https://cloud.r-project.org/bin/macosx/el-capitan/contrib/3.5/wordcloud_2.6.tgz'
Content type 'application/x-gzip' length 229178 bytes (223 KB)
==================================================
downloaded 223 KB

Installing wordcloud
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ  \
  --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/ss/2tpkp325521_kfgn59g44vd80000gn/T/RtmpyqELYw/devtools51d23016153/wordcloud'  \
  --library='/Library/Frameworks/R.framework/Versions/3.5/Resources/library'  \
  --install-tests

* installing *binary* package ‘wordcloud’ ...
* DONE (wordcloud)
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ  \
  --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/ss/2tpkp325521_kfgn59g44vd80000gn/T/RtmpyqELYw/devtools51d707c2bab/bomeara-rnsf-2fe2256'  \
  --library='/Library/Frameworks/R.framework/Versions/3.5/Resources/library'  \
  --install-tests

* installing *source* package ‘rnsf’ ...
** R
** data
*** moving datasets to lazyload DB
Warning: file ‘grants.rda’ has magic number 'versi'
  Use of save versions prior to 2 is deprecated
Error in load(zfile, envir = envir) :
  bad restore file magic number (file may be corrupted) -- no data loaded
ERROR: lazydata failed for package ‘rnsf’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rnsf’
Installation failed: Command failed (1)

Fix tests

checking tests ... ERROR
  Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
         e$handled <- TRUE
         test_error <<- e
     }, "could not find function \"testthat\"", quote(testthat("Downloading data works",
         {
             phylotastic <- nsf_return(keyword = "phylotastic")
             expect_gte(nrow(phylotastic), 1)
         }))) at testthat/testcore.R:1
  2: eval(code, test_env)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.