View source: R/EnsureIntercept.R
EnsureIntercept | R Documentation |
A column of ones may be added
EnsureIntercept(x)
x |
Input matrix |
The input matrix possibly with a column of ones added
Øyvind Langsrud
x <- matrix(c(5, 8, 4, 2, 7, 6), 3, 2) EnsureIntercept(x) EnsureIntercept(cbind(x, 2)) EnsureIntercept(cbind(x, 0)) EnsureIntercept(matrix(0, 4, 0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.