rdirs(..., path = getwd(), sep = "_", pad.num = TRUE, text.only = FALSE)
rdirs
will use R's recylcing rule with different
length vectors.TRUE
numbers will be
padded with leading zeros (detects numeric strings
supplied using the colon(:
) operator or combine
(c(
) function.TRUE
rdirs does not
create the directories, but only returns the names. This
allows the names to be passed to new_report
and
presentation
.Generates recursive sub directories. Invisibly returns the names of the sub-directories.
Allows the user to input pieces of directory names to quickly generate multiple sub-directories with similar names nested in the same directory.
## fx <- folder(delete_me) ## owd <- getwd(); setwd(fx) ## rdirs(admin, 1:15, c("d", "f", "w"), c(1, 4, 6)) rdirs(admin, 1:15, c("d", "f", "w"), c(1, 4, 6), text.only = TRUE)[1] "admin_01_d_1" "admin_02_f_4" "admin_03_w_6" "admin_04_d_1" "admin_05_f_4" "admin_06_w_6" "admin_07_d_1" [8] "admin_08_f_4" "admin_09_w_6" "admin_10_d_1" "admin_11_f_4" "admin_12_w_6" "admin_13_d_1" "admin_14_f_4" [15] "admin_15_w_6"## rdirs(session, 1:12, seq(as.Date("2000/1/1"), by = "month", length.out = 12)) x <- rdirs(admin, 1:15, c("d", "f", "w"), c(1, 4, 6), text.only = TRUE) ## lapply(x, new_report) ## setwd(owd); delete(fx)