Learn R Programming

DTSg (version 0.2.0)

nas.DTSg: List Missing Values

Description

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

Usage

# S3 method for 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

DTSg, cols, data.table

Examples

Run this code
# NOT RUN {
# new DTSg object
x <- DTSg$new(values = flow)

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

## S3 method
nas(x = x)

# }

Run the code above in your browser using DataLab