Learn R Programming

SciencesPo (version 0.11.21)

modify: Modify data elements

Description

Modify an element of a vector

Usage

modify(x, position, value)

Arguments

x
data object.
position
Position of the element to be replaced
value
Value to modify

encoding

UTF-8

Examples

Run this code
x <- seq(1:10)
modify(x, 1, 10)

Run the code above in your browser using DataLab