powered by
A column of ones may be added
EnsureIntercept(x)
Input matrix
The input matrix possibly with a column of ones added
# NOT RUN { 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)) # }
Run the code above in your browser using DataLab