dataframe - how to select rows from a data frame using a condition from two columns in R -


i doing differentially gene expression analysis , have data frame p.values <0.05 both conditions (columns). filter p.values <0.05 1 column condition not <0.05 on second column.

df     row.names        padj.co         padj.c2 1   1.1.1.m1    5.789924e-02    1.745791e-02 2   1.1.100.m1  5.875004e-14    3.459149e-14 3   1.1.1000.m1 3.511273e-11    4.045594e-11 

any ideas appreciated.

thanks

you can use

df[df$padj.co < 0.05 & df$padj.c2 >= 0.05, ] 

i don't think understand second question without more background.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -