use_na: Use NA of different classes in your project

Description Usage Arguments Details Value Examples

View source: R/use_na.R

Description

R has several built-in NA values that correspond to the atomic data types, such as NA (logical), NA_integer_ and NA_character_. Calling use_na() allows the programmer to have NA values of any class. In addition, use_na() provides several useful NA values such as NA_list_, NA_Date_ and NA_POSIXct_.

Usage

1
use_na(path = "R", export = TRUE)

Arguments

path

(character) A path pointing at where to copy the file.

export

If TRUE, the file content is exported to NAMESPACE.

Details

The function copies a file with several NA values to 'path/utils-na.R'.

Value

No return value, called for side effects.

Examples

1
2
3
path <- tempfile()
use_na(path)
print(readLines(file.path(path, "utils-na.R")))

usethat documentation built on Sept. 20, 2021, 5:08 p.m.