Learn R Programming

caracas (version 1.1.2)

subs_vec: Substitute af vector of symbols for a vector of values

Description

Substitute af vector of symbols for a vector of values

Usage

subs_vec(s, x, v)

Arguments

s

Expression

x

Names of symbol (vector)

v

Values for x (vector)

See Also

subs(), subs_lst()

Examples

Run this code
if (has_sympy()) {
   x <- as_sym(paste0('x', 1:3))
   e <- 2*x^2
   e
   subs_vec(e, x, 1:3)
   subs_vec(e, x, x^2)
}

Run the code above in your browser using DataLab