Learn R Programming

track (version 1.1.9)

track.summary: Return a summary of the basic properties of tracked objects

Description

Return a summary of the basic properties of tracked objects: name, class, size, dimensions (if any), and creation, modification and access times.

Usage

track.summary(expr, pos = 1, envir = as.environment(pos), list = NULL, pattern = NULL, glob = NULL, all.names = FALSE, times = track.options("summaryTimes", envir=envir)[[1]], access = track.options("summaryAccess", envir=envir)[[1]], size=TRUE, cache=FALSE, full=FALSE)

Arguments

expr
: An unquoted variable name
pos
: The search path position of the environment being tracked (default is 1 for the global environment)
envir
: The environment being tracked. This is an alternate way (to the use of pos=) of specifying the environment being tracked, but should be rarely needed.
list
: A character vector of variable names to summarize
pattern
: A regular expression specifying variable names to summarize
glob
: A regular expression specifying variable names to summarize
all.names
: should names beginning with a period be included (like all.names in ls)
times
: An integer 0..3 specifying how many time columns to return (in order of: modify, create, access)
access
: An integer 0..3 specifying how many access-count columns to return for each writes and accesses (0=none, 1=total, 2=prior and current session, 3=prior, current session and total)
size
: (logical) include the size column? (The values in this column are system dependent, so make it easy to exclude so that test output is constant across systems.)
cache
: (logical) include the cache column?
full
: (logical) include all the optional columns?

Value

The value returned is a dataframe that summarizes the specified objects. This function does not create any output itself -- the auto-printing of the returned value is the visible output. The data frame has one row for each object (rownames are the object names) and some of the following columns:Which columns are present depends on the arguments times, access, and size.The reason for the class column containing all classes of the object separated by commas is that extracting the most informative class label is not simple, for example, the class of an object returned by glm() is c("glm", "lm") (most informative first), while the class of an object returned by Sys.time() is c("POSIXt", "POSIXct") (most informative last).

Details

Returns part or all of the cached summary data. There is one row per object. Only tracked objects appear in the summary.

See Also

Overview and design of the track package.

Examples

Run this code
##############################################################
# Warning: running this example will cause variables currently
# in the R global environment to be written to .RData files
# in a tracking database on the filesystem under R's temporary
# directory, and will cause the variables to be removed temporarily
# from the R global environment.
# It is recommended to run this example with a fresh R session
# with no important variables in the global environment.
##############################################################

library(track)
track.start(dir=file.path(tempdir(), 'rdatadir11'))
x <- 33
X <- array(1:24, dim=2:4)
Y <- list(a=1:3,b=2)
X[2] <- -1
y1 <- 2
y2 <- 3
track.summary()
track.summary(time=0, access=1, size=FALSE)
track.summary(X)
track.summary(list=c("x", "X"))
track.summary(pattern="[xX]")
# Would normally not call track.stop(), but do so here to clean up after
# running this example.
track.stop(pos=1, keepVars=TRUE)

Run the code above in your browser using DataLab