Learn R Programming

ivmte (version 1.0.1)

genej: Auxiliary function: generating basis vectors

Description

Auxiliary function to generate standard basis vectors.

Usage

genej(pos, length)

Arguments

pos

The position of the non-zero entry/dimension the basis vector corresponds to

length

Number of dimensions in total/length of vector.

Value

Vector containing 1 in a single position, and 0 elsewhere.