knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Last run: r date()
library(chasingcovid)
Get rid of %X to get rid of time of day:
fname <- file.path("..", "inst", "extdata", paste0("public_", format(Sys.time(), "%Y-%m-%d_%X"), ".csv")) dat1 <- getData(url = "https://www.dropbox.com/s/pa9oiozesrpeug2/fakec3data_small.csv?dl=1", file = fname, key = "demokeyvalue") getwd() dir()
Try printing an environment variable - should appear in vignette but not GHA logs:
print(Sys.getenv("DROPBOX_TESTURL"))
dat2 <- getData(url = Sys.getenv("DROPBOX_TESTURL"), file = "testfile2.csv", key = Sys.getenv("MD5_TESTKEY")) identical(dat1, dat2)
See listing of data files on GitHub at https://github.com/waldronlab/chasingcovid/tree/main/inst/extdata.
baseurl <- "https://raw.githubusercontent.com/waldronlab/chasingcovid/main/inst/extdata/" csvfiles <- dir(file.path("..", "inst", "extdata"), pattern=glob2rx("public*.csv")) csvurls <- paste0(baseurl, csvfiles) filetab <- data.frame(file = sub("\\.csv", "", csvfiles), csv = csvurls)
Example for a better table listing at https://github.com/waldronbios2/cunybios2/blob/master/README.Rmd
filetab
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.