vect.clean: Replaces missing values of a vector by a given value

View source: R/rutils.R

vect.cleanR Documentation

Replaces missing values of a vector by a given value

Description

Replaces missing values of a vector by a given value

Usage

vect.clean(v, x = 0)

Arguments

v

vector of any type: Vector containing missing values (NA)

x

Scalar value same type as v: The value by which the missing values are replaced (default is 0)

Value

Vector same type as v: in which missing values are replaced by x

Examples

vect.clean(c(1, NA, 3), 2)
[1] 1 2 3


genpack/gener documentation built on March 14, 2023, 9:52 a.m.