Description Usage Arguments Value Examples
Search subfolders for a file type with a particular column name and optionally validate.
1 2 | search_subfolders(subfolder_paths, colname, fun = NULL, pattern = ".csv$",
...)
|
subfolder_paths |
A vector of directory paths to search in (from
|
colname |
A column name to search for in the designated file type
( |
fun |
A valiData validating function (optional). |
pattern |
The file type to search for. |
... |
Additional arguments given to the |
Gives data.frame and info on matching criteria.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
if (!require("pacman")) install.packages("pacman")
pacman::p_load(magrittr, dplyr, cl)
## get csv files that have "AcademicStanding" header
potential_student_files <- cl::l_drive_go("/FTP") %>%
list.dirs() %>%
assign("dirs", ., .GlobalEnv) %>%
## get_subfolder_path("MyFolder") %>%
cl::search_subfolders("AcademicStanding")
## filter results
potential_student_files %>%
filter(perc_non_miss > 0) %>%
print.data.frame()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.