ncol(x) nrow(x)
nrow returns the number of rows in x.
ncol(freeny.x) # create a matrix of 0's the same size as freeny.x x <- matrix(numeric(length(freeny.x)), nrow = nrow(freeny.x))
# create a matrix of 0's the same size as freeny.x x <- matrix(numeric(length(freeny.x)), nrow = nrow(freeny.x))