9.2 select()

select() will select columns.

Select only columns Gene and DE from geneexp:

select(geneexp, Gene, DE)
## # A tibble: 20 × 2
##    Gene   DE   
##    <chr>  <chr>
##  1 DKK1   No   
##  2 TP53   No   
##  3 BRCA1  No   
##  4 AKT3   Down 
##  5 CCND1  No   
##  6 AXL    No   
##  7 STAT3  Down 
##  8 CCL1   No   
##  9 TRAF2  No   
## 10 IL1R   No   
## 11 TAB2   No   
## 12 HPK1   Down 
## 13 TLR8   Up   
## 14 TGFB   No   
## 15 STAT5  Down 
## 16 ADAM17 Down 
## 17 PTEN   Up   
## 18 SMRT   No   
## 19 DVL    No   
## 20 MAPK2  Up

Again, a good practice is to save that subset into a new object:

geneexp_selected <- select(geneexp, Gene, DE)