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

Solved issue with count.only=TRUE #192

Closed
wants to merge 3 commits into from
Closed

Conversation

massimoaria
Copy link
Collaborator

Solved this issue:

devtools::build_readme() returns an error.

ℹ Installing openalexR in temporary library
ℹ Building /Users/massimoaria/Rpackages/openalexR/README.Rmd

Quitting from lines 190-203 [unnamed-chunk-12] (README.Rmd)
Error in item$last_known_institution :
$ operator is invalid for atomic vectors
Error:
! in callr subprocess.
Caused by error in item$last_known_institution:
! $ operator is invalid for atomic vectors
ℹ See $stdout for standard output.
Type .Last.error to see the more details.
We are not able to build readme because the following lines don't work:

my_arguments <- list(
entity = "authors",
last_known_institution.id = "I71267560",
works_count = ">499"
)
do.call(oa_fetch, c(my_arguments, list(count_only = TRUE)))

The issue appears only when you set count_only = TRUE

Copy link
Collaborator

@trangdata trangdata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an issue with oa_fetch. We hardcoded the number of fields returned in result$meta, and it looks like OpenAlex just added a new field groups_count. I suggest closing this PR and change this line in oa2df:

if (count_only && length(data) == 4) {

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

Successfully merging this pull request may close these issues.

2 participants