Description Usage Arguments Value Note See Also Examples
View source: R/shape_tornado.R
The melt_tornado
emulates for the TornadoExperiment class
what the melt()
function does in the reshape2 package. It converts
the data to long format, which is the format of choice in the tidyverse
family of packages.
1 | melt_tornado(tornado, assay_name = assayNames(tornado))
|
tornado |
A TornadoExperiment object. |
assay_name |
A |
A data.frame
with prod(dim(tornado))
rows.
For plotting purposes, the prep_tornado()
function
does a more efficient job than melt_tornado()
.
Other tornado utilities:
flatten_features()
,
norm_tornado()
,
sort_tornado()
1 2 3 4 5 6 7 8 9 10 | # Melt a tornado
tor <- dummy_tornado()
# Reshaping to long format
df <- melt_tornado(tor)
# Building a tornado plot from scratch
require(ggplot2)
ggplot(df, aes(position, feature_nr)) +
geom_raster(aes(fill = value)) +
facet_grid(feature_set ~ sample_name)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.