Get Names of Objects in .RData files

listObjects(files)

Arguments

files

vector of full paths to .RData files

Examples

## Not run ## Search for available .RData files below "searchdir" #searchdir <- "//poseidon/projekte$/SUW_Department/Projects/SEMA/WP/20_Braunschweig" #files <- dir(searchdir, pattern = "\\\\.RData$", recursive = TRUE, full.names = TRUE) ## Get the names of the objects in the .RData files #objectsInFiles <- listObjects(files) ## Which file contains the object "DataQ"? #dataQ.found <- sapply(objectsInFiles, function(x) {"DataQ" %in% x}) #cat("DataQ was found in the following files:", # paste(files[dataQ.found], collapse = "\n "))