With the R functions
names(), you can identify the columns of a matrix that meet some specified criteria.
Say we have the following matrix,
To return only those columns that end with a character (e.g., the number 1) submit the R command
grep(pattern=".",x=names(x),value=TRUE) into the console.