Description Usage Arguments Details Value See Also Examples
Rank-Count plot
1 2 |
x |
numeric or integer vector of counts |
log |
character vector indicating the axis or axes
log-transform, with any presence of |
flip_axes |
logical indicating whether to flip the x- and y-axis coordinates. |
highlight_range |
optional numeric range to highlight, intended to represent the range of counts selected for downstream analysis. |
... |
additional arguments are ignored |
This function creates a classic "knee plot" showing
"Rank"
on the x-axis, and "Count"
on the y-axis,
typically with log-scaled x- and y-axes.
ggplot
object sufficient to plot the Rank-Count
data, including the optional highlighted points based
upon the highlight_range
values.
Other SALSA visualization functions: plot_fr_wei
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(salsa);
data(oz2_numi_per_cell);
usecounts <- sort(oz2_numi_per_cell$count);
rank_count_plot(usecounts,
highlight_range=c(100,2500)) +
ggtitle("All counts unfiltered");
# after filtering, it may help add y=1 to the axis range
usecounts <- usecounts[usecounts >= 16];
rank_count_plot(usecounts,
highlight_range=c(100,2500)) +
expand_limits(y=c(1,NA)) +
ggtitle("Filtered for counts >= 16");
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.