I wanted to delete all the columns with "No", such as DIGSANo, SETFANo, ... How do I do it? Thank you! The data is here enter link description here
Asked
Active
Viewed 114 times
-1
-
2Next time, in order to help us to help you, please: specify well what you are trying to achieve, provide some reproducible [code](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) and if possible a desired output. It is harder to help you trying to guess what your purposes are. – SabDeM Jul 13 '15 at 13:55
-
You wouldn't get so many downvotes if you posted some sample data and an attempt to do it yourself. Try reading this: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Mike Wise Jul 13 '15 at 13:56
1 Answers
3
One way could be with dplyr
and the functions that work inside select
:
iris %>% select(-ends_with("Width"))
In you case you should do something like:
yourData %>% select(-ends_with("No"))

SabDeM
- 7,050
- 2
- 25
- 38