0

I have printed out a matrix with stringdistmatrix(c(). Works well, but now I need R to show me all cases with a value <=3. How can I search for those values in the matrix?

Thanks in advance!

Fox
  • 41
  • 4

1 Answers1

0

Define the output as a matrix and index?

d <- as.matrix(stringdistmatrix(c('foo','bar','boo','baz')))
d[d<=3]
timfaber
  • 2,060
  • 1
  • 15
  • 17