blankNA: blankNA

Description Usage Arguments Details Value Author(s)

Description

Given a RANADU-convention data.frame or tibble, this function sets values of specified variables missing for rows where the .Restr variable is TRUE. Variable attributes are preserved and the remainder of the data.frame is preserved, with data.frame attributes.

Usage

1
blankNA(.d, .Restr = rep(TRUE, nrow(.d)), .names = names(.d)[-1])

Arguments

.d

A data.frame or tibble that follows RANADU conventions. It normally should contain a POSIXCT-format variable named "Time" and any variables needed for the calculation of the new variable.

.Restr

A TRUE/FALSE vector indicating which values to set missing, or a statement that will generate such a vector. The default is to make no changes.

.names

A vector of variable names that should be set missing where .Restr is TRUE. The default is to modify all variables except Time, including .Restr

Details

The purpose of this function is to enable plots where the excluded variables have gaps rather than connecting lines spanning the exclusion. This is suitable for use in pipes like D Another syntax is to generate the restriction variable: D

Value

A new data.frame or tibble with the modified variables.

Author(s)

William Cooper


NCAR/Ranadu documentation built on July 30, 2019, 11:08 p.m.