Learn R Programming

mark (version 0.8.1)

not_available: Make not available

Description

Create NA vectors

Usage

not_available(type = "logical", length = 0L)

set_not_available(type, value)

NA_Date_

NA_POSIXct_

NA_POSIXlt_

Value

A vector of NA values

Format

An object of class Date of length 1.

An object of class POSIXct (inherits from POSIXt) of length 1.

An object of class POSIXlt (inherits from POSIXt) of length 1.

Arguments

type

Type of NA (see details)

length

Length of the vector

value

A value to return in not_available()

Details

If length is a text it will search for an appropriate match.

Examples

Run this code
x <- not_available("Date", 3)
x
class(x)

Run the code above in your browser using DataLab