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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -