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

remove hit_count from epmc_search results? #4

Closed
cstubben opened this issue Apr 18, 2016 · 2 comments
Closed

remove hit_count from epmc_search results? #4

cstubben opened this issue Apr 18, 2016 · 2 comments

Comments

@cstubben
Copy link

First, thanks for all the updates. Second, I have a minor request to remove hit_count from the epmc_search results and just return a data.frame. I would add hit_count as an attribute and also create a new function like epmc_hits to get the hit_count since you often need that first before running a query to download records.

query <- 'abstract:"burkholderia pseudomallei"'
epmc_search(query, limit=1)$hit_count
1646 records found. Retrieving batch 1
[1] 1646

# ADD function to count hits  instead
epmc_hits(query)
[1] 1646

## set pageSize and limit based on hit_count 
bp <- epmc_search(query, 1000, 2000)$data
nrow(bp)
[1] 1646

# and I would just  add hit count as attribute in epmc_search 
attr(md, "hit_count") <- hit_count
md
njahn82 added a commit that referenced this issue Apr 19, 2016
@njahn82
Copy link
Member

njahn82 commented Apr 19, 2016

Thank you for suggesting the epmc_hits function that I have implemented now. Hope, this works fine for you

@cstubben
Copy link
Author

Thanks - I updated the readme on my github page to use this new function.

njahn82 added a commit that referenced this issue May 3, 2016
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