Filtering a matrix for the same value
Hello, I have a matrix with samples in columns, pathways names in rows and p values in each cell. I would like to subset the matrix based on the cell values, e.g cell <0.05. I've tried to do it using this function. Is it correct? Thanks in advance.
matrix_filt<-matrix[which(matrix<0.05),]
matrix_filt<-matrix_filt[!duplicated(matrix_filt),]
• 571 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Hello fp89!
We believe that this post does not fit the main topic of this site.
Not a bioinformatics question. Please search/ask StackOverflow
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!