You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my use case, I need to create a complex query that will likely require creating many smaller queries first and combining them with a web_history. (Specifically, I'm doing a search for many medications, and then I want to look for drug-drug interactions between them, pairwise.)
For that, it would be helpful to be able to create a new search from multiple esearch objects that have a web_history.
Specifically, what I'm thinking of is to be able to simplify the last two lines of this:
library(rentrez)
query_part1<-"(adolescent[Title/Abstract] OR adolescents[Title/Abstract] OR apprentice[Title/Abstract] OR apprentices[Title/Abstract] OR child[Title/Abstract] OR children[Title/Abstract] OR pupil[Title/Abstract] OR pupils[Title/Abstract] OR student[Title/Abstract] OR students[Title/Abstract] OR teenager[Title/Abstract] OR teenagers[Title/Abstract] OR trainee[Title/Abstract] OR trainees[Title/Abstract] OR young adult[Title/Abstract] OR young adults[Title/Abstract] OR young people[Title/Abstract] OR young worker[Title/Abstract] OR young workers[Title/Abstract] OR younger population[Title/Abstract] OR youth[Title/Abstract])"query_part3<-"(frequency[Title/Abstract] OR frequencys[Title/Abstract] OR occurence[Title/Abstract] OR prevalence[Title/Abstract] OR prevalences[Title/Abstract] OR rate[Title/Abstract] OR rates[Title/Abstract] OR risk[Title/Abstract] OR risks[Title/Abstract])"q1<- entrez_search(db="pubmed", term=query_part1, use_history=TRUE)
q3<- entrez_search(db="pubmed", term=query_part3, use_history=TRUE, WebEnv=q1$web_history$WebEnv)
query_combine_1_3<- sprintf("#%s AND #%s", q1$web_history$QueryKey, q3$web_history$QueryKey)
q1_3<- entrez_search(db="pubmed", term=query_combine_1_3, use_history=TRUE, WebEnv=q1$web_history$WebEnv)
In my use case, I need to create a complex query that will likely require creating many smaller queries first and combining them with a web_history. (Specifically, I'm doing a search for many medications, and then I want to look for drug-drug interactions between them, pairwise.)
For that, it would be helpful to be able to create a new search from multiple esearch objects that have a web_history.
Specifically, what I'm thinking of is to be able to simplify the last two lines of this:
I'd like to be able to replace:
With:
What would happen under the hood would look a lot like the code that I gave above:
The text was updated successfully, but these errors were encountered: