Closed crew102 closed 5 years ago
thanks for another report @crew102
if you could submit a fix PR that'd be great
do submit separate PR's for the two issues if you could
Yep no problem, I'll submit separate PRs. I should probably have them both submitted sometime later this week, after I've had a chance to ramp up on vcr
.
The inverted index that the API serves sometimes has missing values. For example, the index may provide information about the tokens at locations 0, 2, and 3, but not location 1 (e.g.,
"InvertedIndex":{"i":[0],"big":[2], "dogs":[3]}.
)invabs2abs()
, however, assumes that there is a token for each location. This results in NAs getting inserted into the abstract text.Created on 2019-01-07 by the reprex package (v0.2.0.9000).
Session info
``` r devtools::session_info() #> Session info ------------------------------------------------------------- #> setting value #> version R version 3.4.4 (2018-03-15) #> system x86_64, linux-gnu #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> tz America/New_York #> date 2019-01-07 #> Packages ----------------------------------------------------------------- #> package * version date source #> backports 1.1.2 2017-12-13 cran (@1.1.2) #> base * 3.4.4 2018-03-16 local #> compiler 3.4.4 2018-03-16 local #> crul 0.7.0 2019-01-04 CRAN (R 3.4.4) #> curl 3.2 2018-03-28 CRAN (R 3.4.4) #> datasets * 3.4.4 2018-03-16 local #> devtools 1.13.6 2018-06-27 cran (@1.13.6) #> digest 0.6.17 2018-09-12 cran (@0.6.17) #> evaluate 0.10.1 2017-06-24 cran (@0.10.1) #> graphics * 3.4.4 2018-03-16 local #> grDevices * 3.4.4 2018-03-16 local #> htmltools 0.3.6 2017-04-28 cran (@0.3.6) #> httpcode 0.2.0 2016-11-14 CRAN (R 3.4.4) #> jsonlite * 1.5 2017-06-01 cran (@1.5) #> knitr 1.20 2018-02-20 cran (@1.20) #> magrittr 1.5 2014-11-22 cran (@1.5) #> memoise 1.1.0 2017-04-21 CRAN (R 3.4.4) #> methods * 3.4.4 2018-03-16 local #> microdemic * 0.4.0 2018-10-25 CRAN (R 3.4.4) #> pillar 1.2.3 2018-05-25 cran (@1.2.3) #> R6 2.2.2 2017-06-17 cran (@2.2.2) #> Rcpp 0.12.18 2018-07-23 cran (@0.12.18) #> rlang 0.2.2 2018-08-16 cran (@0.2.2) #> rmarkdown 1.10 2018-06-11 cran (@1.10) #> rprojroot 1.3-2 2018-01-03 cran (@1.3-2) #> stats * 3.4.4 2018-03-16 local #> stringi 1.2.4 2018-07-20 cran (@1.2.4) #> stringr 1.3.1 2018-05-10 cran (@1.3.1) #> tibble 1.4.2 2018-01-22 cran (@1.4.2) #> tools 3.4.4 2018-03-16 local #> triebeard 0.3.0 2016-08-04 CRAN (R 3.4.4) #> urltools 1.7.1 2018-08-03 CRAN (R 3.4.4) #> utils * 3.4.4 2018-03-16 local #> withr 2.1.2 2018-03-15 CRAN (R 3.4.4) #> yaml 2.2.0 2018-07-25 cran (@2.2.0) ```Happy to issue a PR for this.