Learn R Programming

KarsTS (version 2.3)

getClassEnvir: getClassEnvir: get objects of a class from an environment

Description

This function identifies objects of a class in an environment

Usage

getClassEnvir(classGet = "list", envir = KTSEnv)

Arguments

classGet

The class

envir

The environment

Value

A vector with the names of the objects

Examples

Run this code
# NOT RUN {
## Generate a time series
genTSExample(name = "TS", InKTSEnv = TRUE)
## Generate some gap sets consisiting of four gaps of 3 NAs each
genGapExample(KTSEnv$TS, 3, 4, name = "NewGapSet1", InKTSEnv = TRUE)
genGapExample(KTSEnv$TS, 3, 4, name = "NewGapSet2", InKTSEnv = TRUE)
genGapExample(KTSEnv$TS, 3, 4, name = "NewGapSet3", InKTSEnv = TRUE)

KTSEnv$NoGapSet <- list(1:6, 3:4, "Lemon")

# Get the lists in KTSEnv (gap sets and other)
listsInKTSEnvget <- getClassEnvir(classGet = "list", envir = KTSEnv)
# Detect gap sets in the environment KTSEnv
detectedGapSets <- gapDetect()

listsInKTSEnvget
detectedGapSets

# }

Run the code above in your browser using DataLab