plot_samples | R Documentation |
Pretty-plots comparisons between two samples in a scatterplot.
plot_samples(
df,
xcol,
ycol,
xlab,
ylab,
color_col = NULL,
color_lab = NULL,
color_values = NULL,
print_cor = FALSE
)
df |
Reads or lfc dataframe. |
xcol |
Name of column containing values to plot on the x-axis. |
ycol |
Name of column containing values to plot on the y-axis. |
xlab |
X-axis label. |
ylab |
Y-axis label. |
color_col |
Name of column to color points by (optional). |
color_lab |
Name of color legend (optional, defaults to color_col). |
color_values |
Named list of discrete values in color_col mapped to their respective colors (defaults to RColorBrewer's Set2 colors with NULL). |
print_cor |
If true, prints Pearson correlation between columns (default FALSE). |
A list of three elements. The first is a ggplot object, the second is the correlation between xcol and ycol, and the third is the Spearman correlation between xcol and ycol.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.