getWeights <- function(object){
if ("weights" %in% assayNames(object)){
out <- assays(object)$weights
} else if ("scores" %in% assayNames(object)){
out <- assays(object)$scores
} else {
stop("No appropriately named assay. See Details section in man page")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.