Learn R Programming

rbioacc (version 1.2.1)

replace_: Replace element of a vector

Description

Replace element of a vector

Usage

replace_(x, from, to)

Value

a vector

Arguments

x

a vector

from

a vector of elements to replace

to

a vector with replacing elements

Examples

Run this code
 
replace_(1:10,c(2,4,5,8), c(0,0,0,0))
replace_(c(1,2,2,3,2),c(3,2), c(4,5))


Run the code above in your browser using DataLab