# Define a function that calculates depths of peaks in interactions
calcDepths <- function(df,type="product")
{
if (type == "product")
{
depths = as.numeric(df[,1]) * as.numeric(df[,2])
}
if (type == "sum")
{
depths = as.numeric(df[,1]) + as.numeric(df[,2])
}
return(depths)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.