#' rData Folder
#'
#' This function creates a unique folder for data and records paths as variables.
#' @param activate Do you love organized data? Defaults to TRUE.
#' @keywords data
#' @export
#' @examples
#' data.folder()
data.folder <- function(wd) {
working.directory <- wd
if(Sys.info()["sysname"] == "Darwin") {
# Mac - Set Path for Working Directory
# Create Full Folder Path
folder.mac <<- paste0("", working.directory ,"/Twitter-Data-", format(Sys.time(), "%Y-%m-%d") ,"")
# Check to See if Folder Already Exists
if(dir.exists(paste0(folder.mac))) {
print("Folder Already Exists")
} else {
dir.create(paste0(folder.mac))
print("Mac Folder Successfully Created")
}
} else {
# Windows - Set Path for Working Directory
# Create Full Folder Path
folder.windows <<- paste0("", working.directory ,"\\Twitter-Data-", format(Sys.time(), "%Y-%m-%d") ,"")
# Check to See if Folder Already Exists
if(dir.exists(paste0(folder.windows))) {
print("Folder Already Exists")
} else {
dir.create(paste0(folder.windows))
print("Windows Folder Successfully Created")
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.