how to keep most distant individuals in matrix?

Hi to all
Good Afternoon
I have genetic distance matrix between individuals in data frame format as like in attached pic and it is ranged from 0.0075 to 0.394506.


Now i am using quantile function to keep distant individuals but i am getting below error
Error in probs < -eps :
comparison (3) is possible only for atomic and list types
In addition: Warning message:
In is.na(probs) : is.na() applied to non-(list or vector) of type 'closure'
Here is my code

m.D = as.matrix(dist(dat[-1,],
                       method = "euclidean",
                       diag=F,
                       upper = F)); 
# Only keep the most distant combinations
test = as.data.frame(which(dat > quantile(m.D,dist,na.rm = T), arr.ind = TRUE))

can any help me to solve this error? any help in this regard is highly aprreciated
Thanks in Advance
Regards

this is the cause of the error.
What is the role of the dist function here ? I think it should be omitted. or rather replaced with a choice of which quantile to choose.

quantile(m.D,.75,na.rm = T)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.