listObjects: Get Names of Objects in .RData files

View source: R/io.R

listObjectsR Documentation

Get Names of Objects in .RData files

Description

Get Names of Objects in .RData files

Usage

listObjects(files)

Arguments

files

vector of full paths to .RData files

Examples

## Not run
  
## Search for available .RData files below "searchdir"
#searchdir <- "Y:/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  "))


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.