If $ appears in the row index of a two-part index expression, its value is m, the number of rows of the matrix; if it appears in the column index, its value is n, the number of columns of the matrix. Therefore, A[$, 2] returns the element at the last row and the second column, and A[1, $] returns the element at the first row and last column.
The dollar sign can participate in arithmetic operations. For example, A[$-2] gives the third last element of A; and A[1 : $, $ - 2] returns the second last column of A. Note that the two $'s have different values in this expression.
oz 2009-12-22