View source: R/utilities.R View source: R/HonestDiD-Temp.R
basisVector | R Documentation |
Creates a basis vector of length size
with a 1 in the index
position.
# Create the index basis vector in R^size
basisVector(index, size)
index |
The index at which there should be a one. Default equals one. |
size |
The length of the vector. Default equals one. |
Returns a basis vector of length size
with a 1 in the index
position.
# Create the first basis vector in R^2
basisVector(index = 1, size = 2)
# Create the third basis vector in R^6
basisVector(index = 3, size = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.