apply_default: Apply default values

Description Usage Arguments Examples

View source: R/helpers.R

Description

Apply default values

Usage

1
apply_default(x, default)

Arguments

x

Vector.

default

Vector of default values, matched by position.

Examples

1
2
3
4
5
default <- c(1, 2, 3, 4)
x <- c(10)
apply_default(x, default)
x <- c(10, NA, 30)
apply_default(x, default)

columbia-glacier/cgr documentation built on Aug. 20, 2017, 5:49 p.m.