## Not run:
# # For one article
# out <- alm_events(doi="10.1371/journal.pone.0029797")
# names(out) # names of sources
# # remove those with no data
# out <- out[!out %in% c("sorry, no events content yet","parser not written yet")]
# out[["pmc"]] # get the results for PubMed Central
# out[["twitter"]] # get the results for twitter
# out[["plos_comments"]] # get the results for PLOS comments, sorta messy
# out[c("twitter","crossref")] # get the results for two sources
#
# # Another example
# (out <- alm_events(doi="10.1371/journal.pone.0001543"))
# # remove those with no data
# out <- out[!out %in% c("sorry, no events content yet","parser not written yet")]
# names(out)
# out[['scopus']]
# out[['mendeley']]
# out[['figshare']]
# out[['pubmed']]
#
# # Two doi's
# dois <- c('10.1371/journal.pone.0001543','10.1371/journal.pone.0040117')
# out <- alm_events(doi=dois)
# out[[1]]
# out[[2]]
# out[[1]][["figshare"]]$events
#
# # Many pmcid's
# out <- alm_events(pmcid=c(212692,2082661))
# names(out)
# out['212692']
#
# # Many pmid's
# out <- alm_events(pmid = c(19300479, 19390606, 19343216))
# names(out)
# out['19390606']
#
# # Specify two specific sources
# ## You have to do so through lapply, or similar approach
# lapply(c("crossref","twitter"),
# function(x) alm_events(doi="10.1371/journal.pone.0035869", source_id=x))
#
# # Figshare data
# alm_events(doi="10.1371/journal.pone.0069841", source_id='figshare')
#
# # Datacite data
# alm_events("10.1371/journal.pone.0012090", source_id='datacite')
#
# # Reddit data
# alm_events("10.1371/journal.pone.0015552", source_id='reddit')
#
# # Wordpress data
# alm_events("10.1371/journal.pcbi.1000361", source_id='wordpress')
#
# # Articlecoverage data
# alm_events(doi="10.1371/journal.pmed.0020124", source_id='articlecoverage')
#
# # Articlecoveragecurated data
# headfoo <- function(x) head(x$articlecoveragecurated$events)
# headfoo(alm_events(doi="10.1371/journal.pone.0088278", source_id='articlecoveragecurated'))
# headfoo(alm_events(doi="10.1371/journal.pmed.1001587", source_id='articlecoveragecurated'))
#
# # F1000 Prime data
# alm_events(doi="10.1371/journal.pbio.1001041", source_id='f1000')
# dois <- c('10.1371/journal.pmed.0020124','10.1371/journal.pbio.1001041',
# '10.1371/journal.pbio.0040020')
# res <- alm_events(doi = dois, source_id='f1000')
# res[[3]]
#
# # by source_id only
# alm_events(source_id = "crossref")
# alm_events(source_id = "reddit")
#
# # by publisher_id only
# alm_events(publisher_id = 340)
#
# # search the software lagotto sever
# urls <- c("https://github.com/najoshi/sickle","https://github.com/lh3/wgsim",
# "https://github.com/jstjohn/SeqPrep")
# dat <- alm_events(url = urls, api_url = "http://software.lagotto.io/api/v5/articles")
# ## End(Not run)
Run the code above in your browser using DataLab