within R, I create a matrix
m = matrix(c(1,2,3,4),ncol=2)
then I take just the first column using this syntax:
col1 = m[,1]
This gives me the values from the first column, but col1 is of type "numeric" instead of matrix.
I can convert it back to a matrix by doing:
as.matrix(col1, ncol=1)
but it seems like there's gotta be a better way (a shorter way to initialize a matrix inline as well -- e.g. [[1,3],[2,4]] -- or something.
Any pointers to good reference / ways to learn R basics would be appreciated as well.