## Not run:
# cr_cn(dois="10.1126/science.169.3946.635")
# cr_cn(dois="10.1126/science.169.3946.635", "citeproc-json")
# cr_cn(dois="10.1126/science.169.3946.635", "citeproc-json-ish")
# cr_cn("10.1126/science.169.3946.635", "rdf-xml")
# cr_cn("10.1126/science.169.3946.635", "crossref-xml")
# cr_cn("10.1126/science.169.3946.635", "text")
#
# # return an R bibentry type
# cr_cn("10.1126/science.169.3946.635", "bibentry")
# cr_cn("10.6084/m9.figshare.97218", "bibentry")
#
# # return an apa style citation
# cr_cn("10.1126/science.169.3946.635", "text", "apa")
# cr_cn("10.1126/science.169.3946.635", "text", "harvard3")
# cr_cn("10.1126/science.169.3946.635", "text", "elsevier-harvard")
# cr_cn("10.1126/science.169.3946.635", "text", "ecoscience")
# cr_cn("10.1126/science.169.3946.635", "text", "heredity")
# cr_cn("10.1126/science.169.3946.635", "text", "oikos")
#
# # example with many DOIs
# dois <- cr_r(2)
# cr_cn(dois, "text", "apa")
#
# # Cycle through random styles - print style on each try
# stys <- get_styles()
# foo <- function(x){
# cat(sprintf("<Style>:%s\n", x), sep = "\n\n")
# cat(cr_cn("10.1126/science.169.3946.635", "text", style=x))
# }
# foo(sample(stys, 1))
#
# # Using DataCite DOIs
# ## some formats don't work
# # cr_cn("10.5284/1011335", "text")
# # cr_cn("10.5284/1011335", "crossref-xml")
# # cr_cn("10.5284/1011335", "crossref-tdm")
# ## But most do work
# cr_cn("10.5284/1011335", "datacite-xml")
# cr_cn("10.5284/1011335", "rdf-xml")
# # cr_cn("10.5284/1011335", "turtle")
# cr_cn("10.5284/1011335", "citeproc-json-ish")
# cr_cn("10.5284/1011335", "ris")
# cr_cn("10.5284/1011335", "bibtex")
# cr_cn("10.5284/1011335", "bibentry")
#
# dois <- c('10.5167/UZH-30455','10.5167/UZH-49216','10.5167/UZH-503',
# '10.5167/UZH-38402','10.5167/UZH-41217')
# cat(cr_cn(dois[1]))
# cat(cr_cn(dois[2]))
# cat(cr_cn(dois[3]))
# cat(cr_cn(dois[4]))
#
# # Using Medra DOIs
# cr_cn("10.3233/ISU-150780", "onix-xml")
#
# # Get raw output
# cr_cn(dois = "10.1002/app.27716", format = "citeproc-json", raw = TRUE)
# ## End(Not run)
Run the code above in your browser using DataLab