saveData = function(D,saveDir="",fileName="imageData.rda") {
if(!fs::dir_exists(saveDir)) {
fs::dir_create(saveDir) # create if does not exist
}
saveRDS(D,file= saveDir %+% fileName) # save the file
return(D) # return the data to pass to next part
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.