Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nas.DTSg

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.

...

Not used (S3 method only).

Value

Returns a data.table with five columns:

  • .col: the column name.

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

  • .from: the start date of the missing values group.

  • .to: the end date of the missing values group.

  • .n: the number of missing values in the group.

See Also

Examples

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

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

## S3 method
nas(x = x)

DTSg

A Class for Working with Time Series Based on 'data.table' and 'R6' with Largely Optional Reference Semantics

v0.7.0
MIT + file LICENSE
Authors
Gerold Hepp [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.