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

Error when converting object downloaded by pubmedR into a dataframe #6

Open
Kingsman-Key opened this issue Apr 25, 2021 · 1 comment

Comments

@Kingsman-Key
Copy link

rm(list = ls()) Sys.setenv(language = "en") query <- "((Pregnant Woman[Title/Abstract] OR Woman, Pregnant[Title/Abstract] OR Women, Pregnant[Title/Abstract] OR Pregnant Women[MeSH Terms] OR maternal[Title/Abstract])AND english[LA] AND Journal Article[PT] AND 2015[PDAT] : 2021[PDAT]) NOT Animals[Mesh]" api_key <- "8cb3ea6eee236216deadd5b5ff6289d2f909" res <- pmQueryTotalCount(query = query, api_key = api_key) res$total_count D1 <- pmApiRequest(query = query, limit = res$total_count, api_key = api_key) M <- pubmedR::pmApi2df(P = D1)
This is the error generated by the last row of code
Error in FUN(X[[i]], ...) : invalid multibyte string 656 In addition: There were 36 warnings (use warnings() to see them)
I attached the list downloaded by pubmedR, it's in the form of Rdata
Thanks a lot if you could help me understand what's happening with my code

@Kingsman-Key
Copy link
Author

rm(list = ls())
Sys.setenv(language = "en")
query <- "((Pregnant Woman[Title/Abstract] OR Woman, Pregnant[Title/Abstract] OR Women, Pregnant[Title/Abstract] OR Pregnant Women[MeSH Terms] OR maternal[Title/Abstract])AND english[LA] AND Journal Article[PT] AND 2015[PDAT] : 2021[PDAT]) NOT Animals[Mesh]"
api_key <- "8cb3ea6eee236216deadd5b5ff6289d2f909"
res <- pmQueryTotalCount(query = query, api_key = api_key) res$total_count
D1 <- pmApiRequest(query = query, limit = res$total_count, api_key = api_key) M <- pubmedR::pmApi2df(P = D1)

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

1 participant