dmatrix<-matrix(1:20, nrow=5, ncol=4) ; dmatrix
dmatrix[3,]
dmatrix[,4,drop=FALSE]  #5x1 matrix
dmatrix[,4]
dmatrix[3:4,]
dmatrix[1:2,3:4]
dmatrix[c(1,3,5),c(2,4)]
dmatrix[-c(2,4),-c(1,3,5)]
dmatrix[17]
dmatrix[(dmatrix[,4]>16&dmatrix[,4]<20),4]
dmatrix[(dmatrix[,4]>16&dmatrix[,4]<20),]
length(dmatrix); dim(dmatrix); typeof(dmatrix)
matrix(c(1,5,9,13,17,2,6,10,14,18,3,7,11,15,19,4,8,12,16,20),nrow=5,ncol=4)