IDinfilesearch | R Documentation |
Title Search a list of files for values in a consistent column
IDinfilesearch(IDs, IDcol, files, complete = FALSE)
IDs |
Id values to look for. |
IDcol |
Column containing IDs in files. |
files |
Files to look in |
complete |
Optional; retain files without matches in list or not. Default is FALSE |
Returns a list with file names and rows of data with listed IDs in the IDCol column
# simplewrite(data.frame(a = c(1,2,3), b = c("red", "amber", "green")), "testa.rds")
# simplewrite(data.frame(a = c(1,2,3, 4), b = c("red", "amber", "green", "blue")), "testb.rds")
# files <- list.files(pattern = ".rds")
# dt3 <- IDinfilesearch(IDs = c(3,4), IDcol = "a", files = files)
# dt4 <- IDinfilesearch(IDs = 4, IDcol = "a", files = files, complete = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.