Description Usage Arguments Details Value Examples
View source: R/calculate_similarity.R
Calculate the similarity statistics for SNV profile comparisons.
1 | calculate_similarity(data, similarity = NULL, a = 1, b = 5)
|
data |
The input SNV data dataframe. |
similarity |
Optional dataframe to add results to. |
a |
Similarity score parameter a (integer). |
b |
Similarity score parameter b (integer). |
This function calculates various summary statistics and sample similarities for a given profile comparison dataframe. It returns a small dataframe with the overall similarity score (whose parameters 'a' and 'b' can be adjusted in the function call), total SNV data, the concordance of the data and the sample names in question. This dataframe can also be given to the function, in which case it will simply add another row for the current samples, facilitating downstream aggregate analyses.
A dataframe with summary statistics.
1 2 3 4 5 6 7 8 | # Load test data
data(test_comparison)
# Calculate similarities
similarity <- calculate_similarity(test_comparison)
# Add another row of summary statistics
calculate_similarity(test_comparison, similarity = similarity)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.