Learn R Programming

plot3logit (version 2.2.0)

convex_comb: Computes convex combinations of two vectors

Description

Given two vectors and one or multiple coefficients in \([0,1]\), convex combinations of vectors are computed.

Usage

convex_comb(w, x, y, simplify = TRUE)

Arguments

w

numeric in \([0,1]\) (multiple values are allowed).

x, y

numeric vectors of equal length.

simplify

if TRUE a matrix is returned; if FALSE the output will be a list.

Examples

Run this code
# NOT RUN {
plot3logit:::convex_comb(c(0, 0.3, 0.5, 1), c(1, 0, 0), c(0, 1, 0))
plot3logit:::convex_comb(c(0, 0.3, 0.5, 1), c(1, 0, 0), c(0, 1, 0), FALSE)

# }

Run the code above in your browser using DataLab