### Example of fetching a book by NBK ID Source: https://docs.ropensci.org/europepmc/reference/epmc_ftxt_book.html An example showing how to retrieve a book using its NBK identifier. This example is wrapped in a dontrun block. ```R if (FALSE) { # \dontrun{ epmc_ftxt_book("NBK32884") } # } ``` -------------------------------- ### Examples of epmc_ftxt Source: https://docs.ropensci.org/europepmc/reference/epmc_ftxt.html Examples showing how to retrieve full texts using specific PMCIDs. These examples are wrapped in a dontrun block. ```R if (FALSE) { # \dontrun{ epmc_ftxt("PMC3257301") epmc_ftxt("PMC3639880") } # } ``` -------------------------------- ### Examples of epmc_hits queries Source: https://docs.ropensci.org/europepmc/reference/epmc_hits.html Examples demonstrating how to query by abstract content or author ID. These examples are wrapped in a dontrun block. ```R if (FALSE) { # \dontrun{ epmc_hits('abstract:"burkholderia pseudomallei"') epmc_hits('AUTHORID:"0000-0002-7635-3473"') } # } ``` -------------------------------- ### Examples of epmc_citations usage Source: https://docs.ropensci.org/europepmc/reference/epmc_citations.html Examples showing how to call epmc_citations with specific identifiers and data sources. These examples are wrapped in a conditional block and are not run by default. ```R if (FALSE) { # \dontrun{ epmc_citations("PMC3166943", data_src = "pmc") epmc_citations("9338777") } # } ``` -------------------------------- ### epmc_db example calls Source: https://docs.ropensci.org/europepmc/reference/epmc_db.html Example calls to epmc_db with different database identifiers. The example is wrapped in a dontrun block, so it is not executed by default. ```r if (FALSE) { # \dontrun{ epmc_db("12368864", db = "uniprot", limit = 150) epmc_db("25249410", db = "embl") epmc_db("14756321", db = "uniprot") epmc_db("11805837", db = "pride") } # } ``` -------------------------------- ### epmc_details examples Source: https://docs.ropensci.org/europepmc/reference/epmc_details.html Example calls for various data sources, wrapped in \dontrun. Includes PubMed IDs, a PMC record, and examples for agr, pat, cba, ctx, hir, eth, and ppr sources. ```r if (FALSE) { # \dontrun{ epmc_details(ext_id = "26980001") epmc_details(ext_id = "24270414") # PMC record epmc_details(ext_id = "PMC4747116", data_src = "pmc") # Other sources: # Agricolo epmc_details("IND43783977", data_src = "agr") # Biological Patents epmc_details("EP2412369", data_src = "pat") # Chinese Biological Abstracts epmc_details("583843", data_src = "cba") # CiteXplore epmc_details("C6802", data_src = "ctx") # NHS Evidence epmc_details("338638", data_src = "hir") # Theses epmc_details("409323", data_src = "eth") # Preprint epmc_details("PPR158112", data_src = "ppr") } # } ``` -------------------------------- ### Examples of epmc_profile queries Source: https://docs.ropensci.org/europepmc/reference/epmc_profile.html Demonstrates how to perform a simple search and a field-specific search using epmc_profile. ```R if (FALSE) { # \dontrun{ epmc_profile('malaria') # use field search, e.g. query materials and reference section for # mentions of "ropensci" epmc_profile('(METHODS:"ropensci")') } # } ``` -------------------------------- ### Examples: epmc_search_by_doi single DOI, vector, and raw output Source: https://docs.ropensci.org/europepmc/reference/epmc_search_by_doi.html Example calls wrapped in if (FALSE) { # \dontrun{ so they are not run. Shows a single DOI lookup, multiple DOIs in a vector, and full metadata with output = 'raw'. ```r if (FALSE) { # \dontrun{ # single DOI name epmc_search_by_doi(doi = "10.1161/strokeaha.117.018077") # multiple DOIname in a vector my_dois <- c( "10.1159/000479962", "10.1002/sctm.17-0081", "10.1161/strokeaha.117.018077", "10.1007/s12017-017-8447-9") epmc_search_by_doi(doi = my_dois) # full metadata epmc_search_by_doi(doi = my_dois, output = "raw") } # } ``` -------------------------------- ### epmc_hits_trend Examples Source: https://docs.ropensci.org/europepmc/reference/epmc_hits_trend.html Examples demonstrating how to use the function with different query types and periods. These examples are wrapped in a conditional block and are not run by default. ```R if (FALSE) { # \dontrun{ # aspirin as query epmc_hits_trend('aspirin', period = 2006:2016, synonym = FALSE) # link to cran packages in reference lists epmc_hits_trend('REF:"cran.r-project.org*"', period = 2006:2016, synonym = FALSE) # more complex with publication type review epmc_hits_trend('(REF:"cran.r-project.org*") AND (PUB_TYPE:"Review" OR PUB_TYPE:"review-article")', period = 2006:2016, synonym = FALSE) } # } ``` -------------------------------- ### epmc_search examples Source: https://docs.ropensci.org/europepmc/reference/epmc_search.html Various examples demonstrating how to search by keywords, identifiers, ISSN, and how to apply filters like limits, synonym exclusion, and sorting. ```R if (FALSE) { # \dontrun{ #Search articles for 'Gabi-Kat' my.data <- epmc_search(query='Gabi-Kat') #Get article metadata by DOI my.data <- epmc_search(query = 'DOI:10.1007/bf00197367') #Get article metadata by PubMed ID (PMID) my.data <- epmc_search(query = 'EXT_ID:22246381') #Get only PLOS Genetics article with EMBL database references my.data <- epmc_search(query = 'ISSN:1553-7404 HAS_EMBL:y') #Limit search to 250 PLOS Genetics articles my.data <- epmc_search(query = 'ISSN:1553-7404', limit = 250) # exclude MeSH synonyms in search my.data <- epmc_search(query = 'aspirin', synonym = FALSE) # get 100 most cited atricles from PLOS ONE publsihed in 2014 epmc_search(query = '(ISSN:1932-6203) AND FIRST_PDATE:2014', sort = 'cited') # print number of records found attr(my.data, "hit_count") # change output } # } ``` -------------------------------- ### Example: epmc_search_by_doi_ call Source: https://docs.ropensci.org/europepmc/reference/epmc_search_by_doi_.html Example call to epmc_search_by_doi_ with a DOI. Wrapped in if (FALSE) to avoid running during package checks. ```r if (FALSE) { # \dontrun{ epmc_search_by_doi_("10.1159/000479962") } # } ``` -------------------------------- ### Install development version of europepmc from GitHub Source: https://docs.ropensci.org/europepmc/index.html Installs the latest development version of europepmc using the remotes package. ```R require(remotes) install_github("ropensci/europepmc") ``` -------------------------------- ### Examples of epmc_annotations_by_id Source: https://docs.ropensci.org/europepmc/reference/epmc_annotations_by_id.html Examples showing how to retrieve annotations for a single identifier or multiple identifiers. ```R if (FALSE) { # \dontrun{ annotations_by_id("MED:28585529") # multiple ids annotations_by_id(c("MED:28585529", "PMC:PMC1664601")) } # } ``` -------------------------------- ### Examples of epmc_lablinks_count Source: https://docs.ropensci.org/europepmc/reference/epmc_lablinks_count.html Examples showing how to retrieve link counts for specific publication IDs using default and custom data sources. ```R if (FALSE) { # \dontrun{ epmc_lablinks_count("24023770") epmc_lablinks_count("PMC3986813", data_src = "pmc") } # } ``` -------------------------------- ### Install europepmc from CRAN Source: https://docs.ropensci.org/europepmc/index.html Installs the stable version of the europepmc package from CRAN. ```R install.packages("europepmc") ``` -------------------------------- ### Example: calling epmc_db_count Source: https://docs.ropensci.org/europepmc/reference/epmc_db_count.html Example calls wrapped in a dontrun block. The first call uses a PubMed ID, the second uses a PMC ID with data_src set to 'PMC'. ```r if (FALSE) { # \dontrun{ epmc_db_count(ext_id = "10779411") epmc_db_count(ext_id = "PMC3245140", data_src = "PMC") } # } ``` -------------------------------- ### epmc_refs examples Source: https://docs.ropensci.org/europepmc/reference/epmc_refs.html Example calls to epmc_refs, wrapped in a dontrun block. The first uses data_src = "pmc" with a PMC identifier, the others use default data source with PubMed IDs. ```r if (FALSE) { # \dontrun{ epmc_refs("PMC3166943", data_src = "pmc") epmc_refs("25378340") epmc_refs("21753913") } # } ``` -------------------------------- ### Create review graph with epmc_hits_trend() and ggplot2 Source: https://docs.ropensci.org/europepmc/index.html Use epmc_hits_trend() to get yearly hit counts for a query, then plot the proportion of articles using ggplot2. The example uses synonym = FALSE and a period from 1995 to 2019. ```R tt_oa <- europepmc::epmc_hits_trend("Malaria", period = 1995:2019, synonym = FALSE) tt_oa #> # A tibble: 25 × 3 #> year all_hits query_hits #> #> 1 1995 449216 1471 #> 2 1996 458644 1529 #> 3 1997 456804 1834 #> 4 1998 474693 1756 #> 5 1999 493837 1951 #> 6 2000 532142 2078 #> 7 2001 545702 2180 #> 8 2002 561497 2351 #> 9 2003 588612 2596 #> 10 2004 628176 2831 #> # ℹ 15 more rows # we use ggplot2 for plotting the graph library(ggplot2) ggplot(tt_oa, aes(year, query_hits / all_hits)) + geom_point() + geom_line() + xlab("Year published") + ylab("Proportion of articles on Malaria in Europe PMC") ``` -------------------------------- ### Perform advanced search with annotation filters Source: https://docs.ropensci.org/europepmc/articles/introducing-europepmc.html This example demonstrates how to use the Europe PMC Advanced Search query syntax directly within the epmc_search function to filter by specific annotation types and providers. ```R epmc_search('malaria AND (ANNOTATION_TYPE:"Cell") AND (ANNOTATION_PROVIDER:"Europe PMC")') #> # A tibble: 100 × 28 #> id source pmid doi title authorString journalTitle issue journalVolume pubYear #> #> 1 30925567 MED 309255… 10.1… Cong… Fatima S, S… Pediatr Eme… 12 37 2021 #> 2 31808816 MED 318088… 10.1… Reti… Villaverde … J Pediatric… 5 9 2020 #> 3 31782768 MED 317827… 10.1… Incr… Jongo SA, C… Clin Infect… 11 71 2020 #> 4 30989220 MED 309892… 10.1… Clin… Enane LA, S… J Pediatric… 3 9 2020 #> 5 31300826 MED 313008… 10.1… Blac… Opoka RO, W… Clin Infect… 11 70 2020 #> 6 31505001 MED 315050… 10.1… Acut… Oshomah-Bel… J Trop Pedi… 2 66 2020 #> 7 31687768 MED 316877… 10.1… Eval… Ferdinand D… Trans R Soc… 3 114 2020 #> 8 31693130 MED 316931… 10.1… Redu… Kingston HW… J Infect Dis 9 221 2020 #> 9 31843017 MED 318430… 10.1… Arte… Pull L, Lup… Malar J 1 18 2019 #> 10 31864353 MED 318643… 10.1… Unde… Adhikari SR… Malar J 1 18 2019 #> # ℹ 90 more rows #> # ℹ 18 more variables: journalIssn , pageInfo , pubType , #> # isOpenAccess , inEPMC , inPMC , hasPDF , hasBook , #> # hasSuppl , citedByCount , hasReferences , hasTextMinedTerms , #> # hasDbCrossReferences , hasLabsLinks , hasTMAccessionNumbers , #> # firstIndexDate , firstPublicationDate , pmcid ``` -------------------------------- ### Perform a free search with epmc_search Source: https://docs.ropensci.org/europepmc/articles/introducing-europepmc.html The epmc_search function is the primary tool for querying Europe PMC metadata and full-text content. This example demonstrates a basic search for 'malaria'. ```r library(europepmc) europepmc::epmc_search('malaria') #> # A tibble: 100 × 29 #> id source pmid pmcid doi title authorString journalTitle issue journalVolume #> #> 1 36419237 MED 36419237 PMC98… 10.1… Path… Walker IS, … Virulence 1 14 #> 2 37158217 MED 37158217 PMC10… 10.1… Mobi… Kollipara A… Glob Health… 1 16 #> 3 37459385 MED 37459385 PMC10… 10.1… A co… Eisenberg S… Glob Health… 1 16 #> 4 37310126 MED 37310126 PMC10… 10.1… Clin… Bi D, Huang… Ann Med 1 55 #> 5 36871259 MED 36871259 PMC99… 10.1… Asse… Jantausch B… Med Educ On… 1 28 #> 6 37053493 MED 37053493 10.1… Opti… Kalula A, M… J Biol Dyn 1 17 #> 7 37191627 MED 37191627 PMC10… 10.1… Huma… Ellis R, We… Hum Vaccin … 1 19 #> 8 37490025 MED 37490025 PMC10… 10.1… Mort… Oduor C, Om… Glob Health… 1 16 #> 9 37165851 MED 37165851 PMC10… 10.1… Tria… Cho Y, Awoo… Glob Health… 1 16 #> 10 37074313 MED 37074313 PMC99… 10.1… Deng… Asaga Mac P… Ann Med 1 55 #> # ℹ 90 more rows #> # ℹ 19 more variables: pubYear , journalIssn , pageInfo , pubType , #> # isOpenAccess , inEPMC , inPMC , hasPDF , hasBook , #> # hasSuppl , citedByCount , hasReferences , hasTextMinedTerms , #> # hasDbCrossReferences , hasLabsLinks , hasTMAccessionNumbers , #> # firstIndexDate , firstPublicationDate , versionNumber ``` -------------------------------- ### Filter search results by text-mined annotations Source: https://docs.ropensci.org/europepmc/articles/introducing-europepmc.html This example shows how to perform a search for 'malaria' and then subset the resulting data frame to include only articles that have text-mined terms or accession numbers. ```R tt <- epmc_search("malaria") tt[tt$hasTextMinedTerms == "Y" | tt$hasTMAccessionNumbers == "Y",] #> # A tibble: 96 × 29 #> id source pmid pmcid doi title authorString journalTitle issue journalVolume #> #> 1 36419237 MED 36419237 PMC98… 10.1… Path… Walker IS, … Virulence 1 14 #> 2 37158217 MED 37158217 PMC10… 10.1… Mobi… Kollipara A… Glob Health… 1 16 #> 3 37459385 MED 37459385 PMC10… 10.1… A co… Eisenberg S… Glob Health… 1 16 #> 4 37310126 MED 37310126 PMC10… 10.1… Clin… Bi D, Huang… Ann Med 1 55 #> 5 36871259 MED 36871259 PMC99… 10.1… Asse… Jantausch B… Med Educ On… 1 28 #> 6 37053493 MED 37053493 10.1… Opti… Kalula A, M… J Biol Dyn 1 17 #> 7 37191627 MED 37191627 PMC10… 10.1… Huma… Ellis R, We… Hum Vaccin … 1 19 #> 8 37490025 MED 37490025 PMC10… 10.1… Mort… Oduor C, Om… Glob Health… 1 16 #> 9 37165851 MED 37165851 PMC10… 10.1… Tria… Cho Y, Awoo… Glob Health… 1 16 #> 10 37074313 MED 37074313 PMC99… 10.1… Deng… Asaga Mac P… Ann Med 1 55 #> # ℹ 86 more rows #> # ℹ 19 more variables: pubYear , journalIssn , pageInfo , pubType , #> # isOpenAccess , inEPMC , inPMC , hasPDF , hasBook , #> # hasSuppl , citedByCount , hasReferences , hasTextMinedTerms , #> # hasDbCrossReferences , hasLabsLinks , hasTMAccessionNumbers , #> # firstIndexDate , firstPublicationDate , versionNumber ``` -------------------------------- ### Create REF queries for code hosting services Source: https://docs.ropensci.org/europepmc/articles/evergreenreviewgraphs.html Constructs Europe PMC reference list queries for code hosting services (code.google.com, github.com, sourceforge.net, bitbucket.org, cran.r-project.org) using the REF: parameter. The queries are restricted to publications with reference lists using has_reflist:y, as Europe PMC does not index references for its complete collection. ```R dvcs <- c("code.google.com", "github.com", "sourceforge.net", "bitbucket.org", "cran.r-project.org") # make queries including reference section dvcs_query <- paste0('REF:"', dvcs, '"') ``` -------------------------------- ### Usage of epmc_search_by_doi_ Source: https://docs.ropensci.org/europepmc/reference/epmc_search_by_doi_.html Shows the function signature with arguments doi, .pb, and output. The output parameter can be 'parsed', 'id_list', or 'raw'. ```r epmc_search_by_doi_(doi, .pb = NULL, output = NULL) ``` -------------------------------- ### Load europepmc into R Source: https://docs.ropensci.org/europepmc/index.html Loads the europepmc package into the R session. ```R library(europepmc) ``` -------------------------------- ### Access full-text XML with epmc_ftxt Source: https://docs.ropensci.org/europepmc/articles/introducing-europepmc.html Retrieves the full-text of an article as an XML document using its PMCID. ```R europepmc::epmc_ftxt("PMC3257301") #> {xml_document} #>
#> [1] \n \n PLoS Pathog [2] \n \n Introduction\n

Atmospheric carbon d ... #> [3] \n \n

We would like to thank Dr. C. Gourlay and Dr. T. von der Haar ... ``` -------------------------------- ### Summarize total hits per query Source: https://docs.ropensci.org/europepmc/articles/evergreenreviewgraphs.html Groups the my_df data frame by query_id and sums the query_hits to get total counts for each code repository query. The result is sorted in descending order of total hits. ```R hits_summary <- my_df %>% group_by(query_id) %>% summarise(all = sum(query_hits)) %>% arrange(desc(all)) ``` -------------------------------- ### epmc_refs function usage Source: https://docs.ropensci.org/europepmc/reference/epmc_refs.html Shows the function signature with default arguments: ext_id = NULL, data_src = "med", limit = 100, verbose = TRUE. ```r epmc_refs(ext_id = NULL, data_src = "med", limit = 100, verbose = TRUE) ``` -------------------------------- ### Usage of epmc_annotations_by_id Source: https://docs.ropensci.org/europepmc/reference/epmc_annotations_by_id.html The basic syntax for calling the function to retrieve annotations. ```R epmc_annotations_by_id(ids = NULL) ``` -------------------------------- ### Usage of epmc_ftxt_book Source: https://docs.ropensci.org/europepmc/reference/epmc_ftxt_book.html The basic syntax for calling the epmc_ftxt_book function with an external identifier. ```R epmc_ftxt_book(ext_id = NULL) ``` -------------------------------- ### epmc_ftxt(ext_id) Source: https://docs.ropensci.org/europepmc/reference/epmc_ftxt.html Loads full texts from Europe PMC into R. Full texts are in XML format and are only provided for the Open Access subset of Europe PMC. ```APIDOC ## epmc_ftxt(ext_id) ### Description Loads full texts from Europe PMC into R. Full texts are in XML format and are only provided for the Open Access subset of Europe PMC. ### Usage epmc_ftxt(ext_id = NULL) ### Arguments - **ext_id** (character) - Required - PMCID. All full text publications have external IDs starting 'PMC_' ### Value xml_document ### Examples ```r if (FALSE) { # \dontrun{ epmc_ftxt("PMC3257301") epmc_ftxt("PMC3639880") } # } ``` ``` -------------------------------- ### Search Europe PMC with epmc_search() Source: https://docs.ropensci.org/europepmc/index.html Use epmc_search() with a Europe PMC query string to retrieve metadata and full-text search results. By default, MeSH synonyms are expanded and 100 records are returned; use synonym = FALSE and limit to adjust. ```R europepmc::epmc_search(query = '"2019-nCoV" OR "2019nCoV"') #> # A tibble: 100 × 29 #> id source pmid pmcid doi title authorString journalTitle issue journalVolume #> #> 1 36754560 MED 36754560 PMC9… 10.1… Inno… Yerlikaya S… BMJ Open 2 13 #> 2 37400836 MED 37400836 PMC1… 10.1… Effe… Ebrahimi T,… BMC Oral He… 1 23 #> 3 37223279 MED 37223279 PMC1… 10.1… Bill… Lamsal R, R… Data Brief 48 #> 4 36727245 MED 36727245 PMC1… 10.1… Vasc… Morrissey E… JBI Evid Sy… 5 21 #> 5 37648680 MED 37648680 10.3… [Cli… Liu ZT, Che… Zhonghua Ya… 10 59 #> 6 37211453 MED 37211453 PMC1… 10.1… Safe… Smith K, He… Vaccine 26 41 #> 7 37479685 MED 37479685 PMC1… 10.1… SuPA… Wei C, Datt… Nat Commun 1 14 #> 8 37652823 MED 37652823 10.1… Immu… Raiser F, D… Vaccine #> 9 37714559 MED 37714559 10.1… New-… Kobayashi N… BMJ Case Rep 9 16 #> 10 PPR525786 PPR 10.1… The … Alihsan B, … #> # ℹ 90 more rows #> # ℹ 19 more variables: pubYear , journalIssn , pageInfo , pubType , #> # isOpenAccess , inEPMC , inPMC , hasPDF , hasBook , #> # hasSuppl , citedByCount , hasReferences , hasTextMinedTerms , #> # hasDbCrossReferences , hasLabsLinks , hasTMAccessionNumbers , #> # firstIndexDate , firstPublicationDate , versionNumber ``` -------------------------------- ### Plot proportion of articles citing software Source: https://docs.ropensci.org/europepmc/articles/evergreenreviewgraphs.html Creates a line and point plot using ggplot2 showing the proportion of articles in Europe PMC that cite each code repository over time. The y-axis is query_hits divided by refs_hits, and colors are assigned by query_id. ```R library(ggplot2) ggplot(my_df, aes(factor(year), query_hits / refs_hits, group = query_id, color = query_id)) + geom_line(size = 1, alpha = 0.8) + geom_point(size = 2) + scale_color_brewer(name = "Query", palette = "Set1")+ xlab("Year published") + ylab("Proportion of articles in Europe PMC") ``` -------------------------------- ### Usage: epmc_search_by_doi(doi = NULL, output = "parsed") Source: https://docs.ropensci.org/europepmc/reference/epmc_search_by_doi.html Function signature for searching Europe PMC by DOI. Default output is 'parsed'; use 'id_list' for IDs and sources, or 'raw' for full metadata lists that can become very large. ```r epmc_search_by_doi(doi = NULL, output = "parsed") ``` -------------------------------- ### Usage of epmc_search_ Source: https://docs.ropensci.org/europepmc/reference/epmc_search_.html The function signature for epmc_search_ showing available parameters for querying Europe PMC. ```R epmc_search_( query = NULL, limit = 100, output = "parsed", page_token = NULL, ... ) ``` -------------------------------- ### epmc_ftxt_book(ext_id = NULL) Source: https://docs.ropensci.org/europepmc/reference/epmc_ftxt_book.html Retrieves book XML formatted full text for the Open Access subset of the Europe PMC bookshelf. The function accepts a publication identifier, either a PMID or an NBK book number, and returns an xml_document. ```APIDOC ## epmc_ftxt_book(ext_id = NULL) ### Description Retrieves book XML formatted full text for the Open Access subset of the Europe PMC bookshelf. ### Usage epmc_ftxt_book(ext_id = NULL) ### Arguments - **ext_id** (character) - Required - Publication identifier. All book full texts are accessible either by the PMID or the 'NBK' book number. ### Value xml_document ### Examples ```r if (FALSE) { # \dontrun{ epmc_ftxt_book("NBK32884") } # } ``` ``` -------------------------------- ### epmc_profile(query = NULL, synonym = TRUE) Source: https://docs.ropensci.org/europepmc/reference/epmc_profile.html Returns the number of results found for the given query, broken down by publication types, data sources, and subsets. The synonym argument controls whether synonym terms from MeSH and UniProt are included in the search. ```APIDOC ## epmc_profile(query = NULL, synonym = TRUE) ### Description Returns the number of results found for the query, broken down by publication types, data sources, and subsets Europe PMC provides. ### Usage ```r epmc_profile(query = NULL, synonym = TRUE) ``` ### Arguments - **query** (character) - Search query. For more information on how to build a search query, see https://europepmc.org/Help - **synonym** (logical) - Synonym search. If TRUE, synonym terms from MeSH terminology and the UniProt synonym list are queried, too. Enabled by default. ### Examples ```r if (FALSE) { # \dontrun{ epmc_profile('malaria') # use field search, e.g. query materials and reference section for # mentions of "ropensci" epmc_profile('(METHODS:"ropensci")') } # } ``` ``` -------------------------------- ### Retrieve article references with epmc_refs Source: https://docs.ropensci.org/europepmc/articles/introducing-europepmc.html Fetches references for a specific article ID. The limit parameter controls the number of results returned. ```R europepmc::epmc_refs("28632490", limit = 200) #> # A tibble: 169 × 19 #> id source citationType title authorString journalAbbreviation issue pubYear volume #> #> 1 12002480 MED JOURNAL ARTI… Tric… Adolfsson-E… Chemosphere 9-10 2002 46 #> 2 18795164 MED JOURNAL ARTI… In v… Ahn KC, Zha… Environ Health Per… 9 2008 116 #> 3 18556606 MED JOURNAL ARTI… Effe… Aiello AE, … Am J Public Health 8 2008 98 #> 4 17683018 MED JOURNAL ARTI… Cons… Aiello AE, … Clin Infect Dis 2007 45 Su… #> 5 15273108 MED JOURNAL ARTI… Rela… Aiello AE, … Antimicrob Agents … 8 2004 48 #> 6 18207219 MED JOURNAL ARTI… The … Allmyr M, H… Sci Total Environ 1 2008 393 #> 7 17007908 MED JOURNAL ARTI… Tric… Allmyr M, A… Sci Total Environ 1 2006 372 #> 8 26948762 MED JOURNAL ARTI… Pres… Alvarez-Riv… J Chromatogr A 2016 1440 #> 9 23192912 MED JOURNAL ARTI… Expo… Anderson SE… Toxicol Sci 1 2012 132 #> 10 25837385 MED JOURNAL ARTI… Obse… Vladar EK, … Methods Cell Biol 2015 127 #> # ℹ 159 more rows #> # ℹ 10 more variables: pageInfo , citedOrder , match , essn , #> # issn , publicationTitle , publisherLoc , publisherName , #> # externalLink , doi ``` -------------------------------- ### epmc_details function usage Source: https://docs.ropensci.org/europepmc/reference/epmc_details.html Shows the function signature with default data_src = 'med'. ```r epmc_details(ext_id = NULL, data_src = "med") ``` -------------------------------- ### Search by author name using epmc_search Source: https://docs.ropensci.org/europepmc/articles/introducing-europepmc.html Performs a search for a specific author using the AUTH query syntax. ```R europepmc::epmc_search('AUTH:"Salmon Maelle"') #> # A tibble: 10 × 28 #> id source pmid doi title authorString journalTitle issue journalVolume pubYear #> #> 1 30378432 MED 303784… 10.1… "Whe… Milà C, Sal… Environ Sci… 22 52 2018 #> 2 29778830 MED 297788… 10.1… "Wea… Salmon M, M… Environ Int 117 2018 #> 3 29751338 MED 297513… 10.1… "Use… Kumar MK, S… Environ Pol… 239 2018 #> 4 29330030 MED 293300… 10.1… "Hea… Mueller N, … Prev Med 109 2018 #> 5 29626773 MED 296267… 10.1… "Dev… Sanchez M, … Sci Total E… 634 2018 #> 6 29088243 MED 290882… 10.1… "Tim… Schumacher … PLoS One 10 12 2017 #> 7 28606699 MED 286066… 10.1… "Int… Tonne C, Sa… Int J Hyg E… 6 220 2017 #> 8 28708095 MED 287080… 10.3… "Pre… Sanchez M, … Int J Envir… 7 14 2017 #> 9 27063588 MED 270635… 10.2… "A s… Salmon M, S… Euro Survei… 13 21 2016 #> 10 26250543 MED 262505… 10.1… "Bay… Salmon M, S… Biom J 6 57 2015 #> # ℹ 18 more variables: journalIssn , pageInfo , pubType , #> # isOpenAccess , inEPMC , inPMC , hasPDF , hasBook , #> # hasSuppl , citedByCount , hasReferences , hasTextMinedTerms , #> # hasDbCrossReferences , hasLabsLinks , hasTMAccessionNumbers , #> # firstIndexDate , firstPublicationDate , pmcid ``` -------------------------------- ### epmc_hits_trend Usage Syntax Source: https://docs.ropensci.org/europepmc/reference/epmc_hits_trend.html The basic function signature for querying yearly hit trends. ```R epmc_hits_trend(query, synonym = TRUE, data_src = "med", period = 1975:2016) ``` -------------------------------- ### Usage of epmc_ftxt Source: https://docs.ropensci.org/europepmc/reference/epmc_ftxt.html The basic syntax for calling the epmc_ftxt function with an external ID. ```R epmc_ftxt(ext_id = NULL) ``` -------------------------------- ### epmc_search function usage Source: https://docs.ropensci.org/europepmc/reference/epmc_search.html The default signature for the epmc_search function. ```R epmc_search( query = NULL, output = "parsed", synonym = TRUE, verbose = TRUE, limit = 100, sort = NULL ) ``` -------------------------------- ### Fetch hit trends for code repository queries Source: https://docs.ropensci.org/europepmc/articles/evergreenreviewgraphs.html Retrieves the number of publications with indexed reference lists and then queries hit counts for each code repository query (e.g., REF:"code.google.com"). The result is a data frame with columns year, all_hits, refs_hits, query_hits, and query_id. ```R # get number of publications with indexed reference lists refs_hits <- europepmc::epmc_hits_trend("has_reflist:y", period = 2009:2022, synonym = FALSE)$query_hits # get hit count querying for code repositories europepmc::epmc_hits_trend(x, period = 2009:2022, synonym = FALSE) %>% dplyr::mutate(query_id = x) %>% dplyr::mutate(refs_hits = refs_hits) %>% dplyr::select(year, all_hits, refs_hits, query_hits, query_id) }) ``` -------------------------------- ### epmc_db function usage Source: https://docs.ropensci.org/europepmc/reference/epmc_db.html Shows the function signature and default arguments. The function retrieves external database entities referenced in a publication. ```r epmc_db( ext_id = NULL, data_src = "med", db = NULL, limit = 100, verbose = TRUE ) ``` -------------------------------- ### Search for multiple author name variants using Boolean OR Source: https://docs.ropensci.org/europepmc/articles/introducing-europepmc.html Uses the Boolean OR operator to search for multiple spelling variants of an author's name with a specified limit. ```R q <- 'AUTH:"PÜHLER Alfred" OR AUTH:"Pühler Alfred Prof. Dr." OR AUTH:"Puhler A"' europepmc::epmc_search(q, limit = 1000) #> # A tibble: 600 × 29 #> id source pmid pmcid doi title authorString journalTitle issue journalVolume #> #> 1 36998097 MED 36998097 PMC10… 10.1… "Abu… Nelkner J, … Environ Mic… 1 18 #> 2 36748496 MED 36748496 10.1… "… Köller N, H… Int J Syst … 12 72 #> 3 36439843 MED 36439843 PMC96… 10.3… "The… Maus I, Wib… Front Micro… 13 #> 4 36305336 MED 36305336 PMC96… 10.2… "Int… Houwaart T,… Euro Survei… 43 27 #> 5 36073816 MED 36073816 PMC96… 10.1… "Rcg… Castellani … mBio 5 13 #> 6 35151713 MED 35151713 10.1… "Two… Steffens T,… J Biotechnol 347 #> 7 34181711 MED 34181711 PMC84… 10.1… "Cha… Walker A, H… Clin Infect… 6 74 #> 8 34682252 MED 34682252 PMC85… 10.3… "Gen… Wibberg D, … J Fungi (Ba… 10 7 #> 9 34592166 MED 34592166 PMC84… 10.1… "Ear… Krämer B, K… Immunity 11 54 #> 10 33589928 MED 33589928 PMC84… 10.1… "Imp… Mayer G, Mü… Brief Bioin… 5 22 #> # ℹ 590 more rows #> # ℹ 19 more variables: pubYear , journalIssn , pageInfo , pubType , #> # isOpenAccess , inEPMC , inPMC , hasPDF , hasBook , #> # hasSuppl , citedByCount , hasReferences , hasTextMinedTerms , #> # hasDbCrossReferences , hasLabsLinks , hasTMAccessionNumbers , #> # firstIndexDate , firstPublicationDate , versionNumber ``` -------------------------------- ### epmc_details(ext_id, data_src) Source: https://docs.ropensci.org/europepmc/reference/epmc_details.html Retrieves detailed metadata for a publication from Europe PMC. The function takes a publication identifier and an optional data source, returning a list of data frames with parsed metadata. ```APIDOC ## epmc_details(ext_id, data_src) ### Description Returns parsed metadata for a given publication ID including abstract, full text links, author details including ORCID and affiliation, MeSH terms, chemicals, grants. ### Usage epmc_details(ext_id = NULL, data_src = "med") ### Arguments - **ext_id** (character) - Required - Publication identifier. - **data_src** (character) - Optional - Data source. Default is "med" (PubMed/MedLine). Other supported sources: agr, cba, ctx, eth, hir, med, pat, pmc, ppr. ### Value A list of data frames. ### Examples ```r if (FALSE) { # \dontrun{ epmc_details(ext_id = "26980001") epmc_details(ext_id = "24270414") # PMC record epmc_details(ext_id = "PMC4747116", data_src = "pmc") # Other sources: # Agricola epmc_details("IND43783977", data_src = "agr") # Biological Patents epmc_details("EP2412369", data_src = "pat") # Chinese Biological Abstracts epmc_details("583843", data_src = "cba") # CiteXplore epmc_details("C6802", data_src = "ctx") # NHS Evidence epmc_details("338638", data_src = "hir") # Theses epmc_details("409323", data_src = "eth") # Preprint epmc_details("PPR158112", data_src = "ppr") } # } ``` ``` -------------------------------- ### Fetch publications with reference lists using purrr Source: https://docs.ropensci.org/europepmc/articles/evergreenreviewgraphs.html Uses dplyr and purrr::map_df to iterate over the constructed REF queries and retrieve publications from Europe PMC that have reference lists, for normalizing the review graph. ```R library(dplyr) my_df <- purrr::map_df(dvcs_query, function(x) { ``` -------------------------------- ### Usage of epmc_lablinks_count Source: https://docs.ropensci.org/europepmc/reference/epmc_lablinks_count.html The basic syntax for calling the function with an optional publication identifier and data source. ```R epmc_lablinks_count(ext_id = NULL, data_src = "med") ``` -------------------------------- ### epmc_lablinks function usage Source: https://docs.ropensci.org/europepmc/reference/epmc_lablinks.html The function signature for retrieving external links from Europe PMC. ```R epmc_lablinks( ext_id = NULL, data_src = "med", lab_id = NULL, limit = 100, verbose = TRUE ) ``` -------------------------------- ### Usage of epmc_profile Source: https://docs.ropensci.org/europepmc/reference/epmc_profile.html The basic function signature for querying Europe PMC hit counts. ```R epmc_profile(query = NULL, synonym = TRUE) ``` -------------------------------- ### epmc_db_count function usage Source: https://docs.ropensci.org/europepmc/reference/epmc_db_count.html Shows the function signature with arguments ext_id and data_src. The data_src defaults to 'med' for the Pubmed/MedLine index. ```r epmc_db_count(ext_id = NULL, data_src = "med") ``` -------------------------------- ### Usage of epmc_citations Source: https://docs.ropensci.org/europepmc/reference/epmc_citations.html The function signature for retrieving citations, including parameters for the external ID, data source, result limit, and verbosity. ```R epmc_citations(ext_id = NULL, data_src = "med", limit = 100, verbose = TRUE) ```