SortByTissue <- function(dat, by.var = "tpm"){
# Sort signal by tissue by renaming factors
dat.ordered <- dat[order(dat[[by.var]], decreasing = TRUE), ]
dat.ordered$tissue <- factor(dat.ordered$tissue, levels = dat.ordered$tissue)
return(dat.ordered)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.