Description Usage Arguments Value Examples
View source: R/fc_graphic_output.R
Plot the results of fcdr_dimred.
1 | fcgo_plot_dimred(fc, dims, pdf_name, main, legend, group_cols, cols, shapes)
|
fc |
The Fc Array data frame that resulted from fcdr_dimred. |
dims |
The number of dimensions used for fcdr_dimred. |
pdf_name |
The name of the output file where the plot will be saved. Should be a full file path. |
main |
The title of the plot. |
legend |
The text that will fill in the legend. Should be a vector of strings. |
group_cols |
The colors for the legend text. Should be a vector of strings of the same length as legend. |
cols |
The colors for each of the points in the plot. Should be of the same length as the number of points plotted (i.e. nrow(fc)). Should probably be the same colors as group_cols if you want your plot to be interpretable. |
shapes |
The shapes for each of the points in the plot. Should be of the same length as the number of points plotted (i.e. nrow(fc)). |
Nothing!
1 2 3 4 5 | fc_tnse = fcdr_dimred(fc, "tsne", dims=2)
group_cols = c("blue", "red")
cols = sapply(fc$group, function(x){ if (x == "PLACEBO"){ return("blue") } else { return("red") } })
shapes = sapply(fc$group, function(x){ if (x == "PLACEBO"){ return(21) } else { return(22) } })
fcgo_plot_dimred(fc_tsne, 2, "results/tsne_plot.pdf", "tSNE Components for PLAC/VACC", c("PLAC", "VACC"), group_cols, cols, shapes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.