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

search returns data.frame of lists #1

Closed
cstubben opened this issue Jul 14, 2015 · 2 comments
Closed

search returns data.frame of lists #1

cstubben opened this issue Jul 14, 2015 · 2 comments

Comments

@cstubben
Copy link

@cstubben cstubben commented Jul 14, 2015

I just installed rebi and noticed that searches return a data.frame of lists (where every "column" is a "list" instead of a numeric, character or other column type), for example
x <- searcheuropmc(query = "Gabi-Kat")
str(x) ##data.frame with 24 lists
class(x$pubYear) # list
table(x$pubYear) #can't run table on a list or plot or do much except unlist

Seems like this is created while combining multiple page results and could be fixed.

@njahn82
Copy link
Member

@njahn82 njahn82 commented Jul 15, 2015

Thank you for your report. While trying to fix it, I thought it might be a better idea to rewrite the package, on which I mainly worked two years ago, according to the rOpenSci guidelines. In particular, I want to use httr and jsonliteinstead of RCurl and RJSONIO

To fix your problem, please use the following functions

https://gist.github.com/njahn82/39f99e3b33ce3cb30c54#file-epmc_search-r

epmc_search returns a list. The publication data has been wrapped to `tbl_df. Example

Until now, I have not been able to include them because I am running into several build issues.

I'll rewrite the other functions soon, but lately in the end of August due to summer vacations. My aim is to reapply and to have it on CRAN.

Hope, it helps.

@njahn82
Copy link
Member

@njahn82 njahn82 commented Mar 10, 2016

Sorry for the late feedback. After I re-worked the package, epmc_search should return list of data.frame's now. Extended metadata can be fetched through epmc_details.

@njahn82 njahn82 closed this Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.