I'm trying to subset, in a big file, all the words that DO NOT end with "_at"
.
For example: the file "myfile" is a data.frame composed as follow (specifically I have a file with 50 columns and 1000 rows):
myfile <- read.table( text = '"G1" "G2"
SEP11 ABCC1
205772_s_at FMO2
214223_at ADAM19
ANK2 215742_at
COPS4 BIK
214808_at DCP1A
ACE ALG3
BAD 215369_at
EMP3 215385_at
CARD8 217579_x_at
', header = TRUE, stringsAsFactors = FALSE)
I would like the following output:
"G1" "G2" SEP11 ABCC1 ANK2 FMO2 COPS4 ADAM19 ACE BIK BAD DCP1A EMP3 ALG3 CARD8
I used the following string but it doesn't work probably because I'm doing something wrong:
sub <- myfile[-grep("\\_at", names(myfile)), ]
Can anyone help me?