Description Usage Arguments Details Value Examples

Utility function for converting similarities into dissimilarities. Different methods are provided.

1 |

`s` |
Similarity matrix (not necessarily symmetric, nor square) |

`method` |
Various methods for converting similarities into dissimilarities: |

`to.dist` |
If |

The conversion formulas for the various methods can be found in the package vignette.

Returns dissimiarities either as matrix or as dist object.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
## Convert crimes data (correlations)
data(crimes)
crimeD <- sim2diss(crimes, method = "corr", to.dist = TRUE)
## Convert Wish data (similarities) by subtracting from 7
data(wish)
wishD <- sim2diss(wish, method = 7, to.dist = TRUE)
## Convert Ekman data (similarities) into dissimilarities
data(ekman)
ekmanD <- sim2diss(ekman, method = "confusion", to.dist = TRUE)
## Convert album ratings (rectangular similarities) by reversing the ratings
data(RockHard)
rockD1 <- sim2diss(RockHard[,5:18], method = "reverse")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.