I would like to delete collumns with a specific string "Gtype." from a .txt tab delimited file. I already have tried this command in R: df <- df[, -grep("GType.", colnames(df))]
to do this task. However my matrix is too big (more than 13 GB), and R cannot deal with it. (Error: cannot allocate vector of size....)
My input file:
Log.NE122 Gtype.NE122 Log.NE144 Gtype.NE144
-0.33 AA 1.0 AB
My expected output:
Log.NE122 Log.NE144
-0.33 1.0
I am wondering that it works in bash. If someone have other options....
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…