Description Usage Arguments Value Methods (by class) Examples
The tornado_plot()
function exists to easily jot down a tornado plot. The
idea behind this function is that whenever you're in doubt on how to plot
your tornado data, this is the function that tries to figure it out for you.
1 2 3 4 5 6 7 8 9 10 | tornado_plot(data, ...)
## S4 method for signature 'ANY'
tornado_plot(data, ...)
## S4 method for signature 'TornadoExperiment'
tornado_plot(data, ..., sort = NULL)
## S4 method for signature 'tornado_df'
tornado_plot(data, ...)
|
data |
A TornadoExperiment, |
... |
Arguments passed on to
|
sort |
A |
Prints a plot as a side effect. Returns a TornadoExperiment
with
the plot in the metadata()
slot. When
data
is a tornado_df
object, instead it returns the plot as-is.
ANY
: The ...
argument is forwarded to
build_tornado()
.
TornadoExperiment
: The ...
argument is forwarded to
prep_tornado()
.
tornado_df
: The ...
argument is forwarded to
autoplot()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # These features and data aren't really pretty
feats <- dummy_features()
data <- dummy_granges_data()
# This will extract and plot the data. The extracted data is now stored in x.
x <- tornado_plot(data, features = feats, width = 3000)
# `x` is the data underlying the plot in an TornadoExperiment object.
print(x)
# The plot generated above is stored in the metadata
metadata(x)$plot
# Or the plot can be recomputed from the data
tornado_plot(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.