listObjects: List Objects

View source: R/listObjects.r

listObjectsR Documentation

List Objects

Description

Internal helper function to list objects in an environment.

Usage

listObjects(
  env = parent.frame(),
  obj.class = NULL,
  sort = NULL,
  decreasing = TRUE,
  debug = FALSE
)

Arguments

env

environment in which to search for objects.

obj.class

character string or vector specifying the object class.

sort

character string "time", "alpha", "size" specifying the sorting order. Default = NULL.

decreasing

logical used to indicate order when sorting is not NULL. Default = TRUE.

debug

logical indicating printing debug information.

Details

Internal helper function to retrieve a list of objects from a workspace. Take an environment as argument and optionally an object class. Returns a list of objects of the specified class in the environment.

Value

character vector with the object names or NULL.

Examples

## Not run: 
# List data frames in the workspace.
listObjects(obj.class = "data.frame")
# List functions in the workspace.
listObjects(obj.class = "function")

## End(Not run)


OskarHansson/strvalidator documentation built on July 22, 2023, 12:04 p.m.