remove_from_vector: Remove from a vector

View source: R/remove_from_vector.R

remove_from_vectorR Documentation

Remove from a vector

Description

Remove certain values from a vector

Usage

remove_from_vector(values = NULL, vector = NULL, silent = FALSE)

Arguments

values

a single value or a vector of values which will be removed from the target vector

vector

a character or numeric vector

silent

if silent = FALSE, a summary of values removed will be printed; if silent = TRUE, such summary will not be printed. By default, silent = FALSE

Value

the output will be a vector with the given values removed.

Examples

remove_from_vector(values = 1, vector = 1:3)
remove_from_vector(values = NA, vector = c(1:3, NA))
remove_from_vector(values = c(1, NA), vector = c(1:3, NA))
remove_from_vector(values = 1:5, vector = 1:10)

kim documentation built on Oct. 9, 2023, 5:08 p.m.