to_na: Sets the elements of vector to 'NA'

to_naR Documentation

Sets the elements of vector to NA

Description

Given a vector i indexing the elements of x, sets the selected elements of x to NA.

Usage

to_na(x, i)

Arguments

x

vector of values

i

vector of values used to subset x

Value

Returns x with possibly some elements set to NA


gavinsimpson/gratia documentation built on March 5, 2025, 10:01 a.m.