nas.DTSg: List missing values

nas.DTSgR Documentation

List missing values

Description

Lists the missing values of selected columns of a DTSg object with recognised periodicity.

Usage

## S3 method for class 'DTSg'
nas(x, cols = self$cols(), ...)

Arguments

x

A DTSg object (S3 method only).

cols

A character vector specifying the columns whose missing values shall be listed. Another possibility is a character string containing either comma separated column names, for example, "x,y,z", or the start and end column separated by a colon, for example, "x:z".

...

Not used (S3 method only).

Value

Returns a data.table::data.table with five columns:

  • .col: the column name

  • .group: the ID of the missing values group within each column

  • .from: the first timestamp of the missing values group

  • .to: the last timestamp of the missing values group

  • .n: the number of missing values per group

See Also

cols

Examples

# new DTSg object
x <- DTSg$new(values = flow)

# list missing values
## R6 method
x$nas()

## S3 method
nas(x = x)


DTSg documentation built on Sept. 28, 2023, 1:06 a.m.