# NOTE: The examples below are flagged as 'dontrun' to avoid
# running downloads repeatedly on CRAN servers
if (FALSE) {
#Put the function wherever you would put a file path
crabs <- read.csv(suppdata("10.6084/m9.figshare.979288", 2))
epmc.fig <- suppdata("10.1371/journal.pone.0126524",
"pone.0126524.s002.jpg", "epmc")
#...note this 'SI' is not actually an SI, but rather an image from the paper.
#View the suffix (file extension) of downloaded files
# - note that not all files are uploaded/stored with useful file extensions!
attr(epmc.fig, "suffix")
copernicus.csv <- suppdata("10.5194/bg-14-1739-2017",
"Table S1 v2 UFK FOR_PUBLICATION.csv",
save.name = "data.csv")
#...note this 'SI' is not an SI but the name of a file in the supplementary information archive.
}
# (examples not run on CRAN to avoid downloading files repeatedly)
Run the code above in your browser using DataLab