plot_by_grp | R Documentation |
Make box, dot, violin or bar plotsfor a feature per group using ggplot2.
plot_by_grp(
object,
grp,
name = "topgenes",
width = 7,
height = 7,
main.v = "",
xlab = "Group",
ylab = "Log2 Expression",
type = "dot",
manual.color = NULL,
x.angle = 0,
add.se = FALSE,
dotsize = 0.7,
bins = 30,
violin.alpha = 0.3,
dot.alpha = 0.3,
add.dot = FALSE,
bar.width = 0.7,
errorbar.width = 0.3
)
object |
Matrix-like object with features (e.g. genes) as rows and samples as columns. |
grp |
Vector of phenotype groups of the samples, which represent valid variable names in R. Should be same
length as |
name |
Name of file to create. Set to |
width |
Manual option for determining the output file width in inches. |
height |
Manual option for determining the output file height in inches. |
main.v |
Character vector of main titles for plot. |
xlab |
Label for x-axis. |
ylab |
Label for y-axis. |
type |
Type of plot. Either |
manual.color |
Vector passed to both |
x.angle |
Angle of x-axis text, passed to |
add.se |
Logical indicating if to add standard error of the mean to dot plot. |
dotsize |
Passed to |
bins |
Used to calculate binwidth, which is passed to |
violin.alpha |
Colour transparency in [0,1] for violin in violin plot. |
dot.alpha |
olour transparency in [0,1] for dots in violin plot. |
add.dot |
Logical indicating if to add individual data points as dots to bar plot. |
bar.width |
Width of the bars in bar plot. |
errorbar.width |
Width of the errorbars in bar plot. |
Based on type
, "_dotplots"
, "_boxplots"
, "_violinplots"
, or "_barplots"
is appended to name
.
If object
is a data frame, it is coerced to a matrix
using data.matrix
.
Invisibly, a ggplot
object from the last row of object
that was plotted.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.