View source: R/term_similarities.R

compute_term_similarities | R Documentation |

Generate similarity matrix for input terms.

```
compute_term_similarities(
df_terms,
similarity_function = jaccard,
max_similarity = 1
)
```

`df_terms` |
Dataframe storing pathway database. |

`similarity_function` |
Function to compute similarity between two sets. |

`max_similarity` |
Value to fill diagonal with. |

Symmetric matrix of similarity scores.

```
df_terms <- data.frame(
term = c("A", "A", "B", "B", "B", "C", "C", "C"),
gene = c("a", "b", "a", "b", "c", "a", "c", "d")
)
compute_term_similarities(df_terms)
```

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.