9.3 rename()
You can easily rename a column using the rename() function.
For example, we can rename column Gene to Symbol, the following way:
## # A tibble: 20 × 4
## Symbol DE sample1 sample2
## <chr> <chr> <dbl> <dbl>
## 1 DKK1 No 9.06 5.27
## 2 TP53 No 3.57 8.55
## 3 BRCA1 No 7.39 8.24
## 4 AKT3 Down 15.1 1.57
## 5 CCND1 No 6.74 10.1
## 6 AXL No 13.5 16.6
## 7 STAT3 Down 15.2 5.46
## 8 CCL1 No 5.28 7.09
## 9 TRAF2 No 8.93 12.9
## 10 IL1R No 8.46 15.3
## 11 TAB2 No 9.76 14.6
## 12 HPK1 Down 14.1 7.34
## 13 TLR8 Up 2.69 16.3
## 14 TGFB No 7.83 12.5
## 15 STAT5 Down 18.6 9.21
## 16 ADAM17 Down 16.1 10.3
## 17 PTEN Up 0.0210 11.2
## 18 SMRT No 11.7 16.9
## 19 DVL No 4.33 6.84
## 20 MAPK2 Up 0.998 9.56
The first argument is the data, then comes the column(s) to rename in the format: new_name=old_name.