Hi,
For dataframe manipulation you should look into the dplyr and tidyr libraries. You can take a look a this cheatsheet for example.
You can remove NAs and rename columns as follows:
library(dplyr)
your_dataframe %>%
dplyr::filter(!is.na(log2FoldChange)) %>%
dplyr::rename(gene_names = X)
Traffic: 1287 users visited in the last hour
Read more here: Source link