queryTs: Find all the time series entries that match a given search...

View source: R/timeseries.R

queryTsR Documentation

Find all the time series entries that match a given search expression, and return vector of the indices that match. indices = queryTs(ts, "archiveType == marine sediment") Valid operators : ==, =, <=, >=, <, >

Description

Find all the time series entries that match a given search expression, and return vector of the indices that match. indices = queryTs(ts, "archiveType == marine sediment") Valid operators : ==, =, <=, >=, <, >

Usage

queryTs(ts, expression, exact = FALSE)

Arguments

ts

Time series list , Time Series data

expression

Search expression char (single query) or list (multiple query)

exact

Key match char. Is the provided key an exact key match or a piece of the key? ie. paleoData_variableName or variableName?

Value

idxs: Matching indices : list

Author(s)

Chris Heiser

Examples

## Not run: 
# Time series
ts = [ object1, object2, object3, object4 ]

# Example 1
idxs = filterTs(ts, "archiveType == marine sediment")
# result
[1, 3, 4]

# Example 2
idxs = filterTs(ts, "paleoData_variableName == d18O")
# result
[2]

## End(Not run)

nickmckay/lipdR documentation built on April 13, 2025, 5:58 p.m.