Closed yjunechoe closed 1 year ago
Oh wait I think you did with
empty_inst
Oops ya that wasn't very clear/intuitive - re-running the reprex on the PR!
oa_fetch(identifier = "W1981492994")$author[[1]]$institution_lineage
#> [1] NA "https://openalex.org/I51556381"
Pinging @massimoaria - all checks are passing on main with this PR merged, so I think we have a resubmission version ready!
Following #155, this PR ensures that missing author "lineage" information is coded as
NA
and applies the same fix forworks2df()
toauthors2df()
.Related: #154 , #156 , #157
Coincidentally, fixing
authors2df()
also resolved the last remaining error in tests involvingoa_random()
, where the following line was sometimes returning dfs longer than 20 rows because multiple lineages would get unnested longer into duplicate entries of the author inauthors2df()
.https://github.com/ropensci/openalexR/blob/ab6554d36e4fa1ff0206ee95d69289e2afa19821/tests/testthat/test-oa_fetch.R#L291