Creating subset matrix from bigger matrix in R -
i have big matrix (i.e 303*32). want create take out columns , make new matrix in r. unable find solution. appreciated.
ads # matrix of 303*32 new_mat <- matrix(c("speed","gaps","time")) # speed, gaps , times names of cols trying exclude.
by using code getting cols , rows name .
if want exclude columns name, need like:
new_mat <- ads[, !colnames(ads) %in% c("speed","gaps","time")]
Comments
Post a Comment