Description Usage Arguments Examples
Update the master file
1 2 | updateMaster(masterFile, fromFile, toFile, id = "email", dateRange = c(0,
Inf), newIdOnly = FALSE, newIdFile)
|
masterFile |
a data frame or a path of the master file |
fromFile |
a list of data frames or paths of the input datasets |
toFile |
a string path of the updated master file |
id |
a string of variable is used as id variable. By default, id variable is email. |
dateRange |
a vector of lower and upper bound of dates that are selected from the input file. |
newIdOnly |
a logical variable to indicate whether or not to update only new IDs. |
newIdFile |
a string of the path that contains new IDs. |
1 2 3 4 5 6 | masterFile <- read.csv("../Variables/email.csv", stringsAsFactors = FALSE)
fromFileList <- paste0("../Variables/", list.files("../Variables/")[!grepl("email.csv", list.files("../Variables"))])
updateMaster(masterFile, as.list(fromFileList), "../Canada master file.csv")
masterFile <- masterFile[-sample(1:nrow(masterFile), 200), ]
updateMaster(masterFile, fromFileList, "../Canada master file2.csv", newIdOnly = TRUE, newIdFile = "../Variables/email.csv")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.