View source: R/rotate_dot_plot_dendrogram.R
rotate_dot_plot_dendrogram | R Documentation |
Take a output from dot_plot function and allow interactive dendrogram rotation with dendextend package
rotate_dot_plot_dendrogram(dot_plot_output, axis_to_rotate = c("x", "y"))
dot_plot_output |
Output from |
axis_to_rotate |
Dendrogram to rotate "x" or "y" |
Print and return rotated dot plot
Simon Leonard - simon.leonard@univ-rennes1.fr
# Perform dot_plot if(interactive()){ library(FlexDotPlot) data(CBMC8K_example_data) # Run dot_plot dotplot_output = dot_plot(data.to.plot=CBMC8K_example_data, size_var="RNA.avg.exp.scaled", dend_x_var=c("RNA.avg.exp.scaled","ADT.avg.exp.scaled"), dend_y_var=c("RNA.avg.exp.scaled","ADT.avg.exp.scaled"), dist_method="euclidean",hclust_method="ward.D", do.return = TRUE) # The following command has to be run when the user #is running example("rotate_dot_plot_dendrogram") only. dotplot_output$command=call("dot_plot", data.to.plot=as.name("CBMC8K_example_data"), size_var="RNA.avg.exp.scaled", dend_x_var=c("RNA.avg.exp.scaled","ADT.avg.exp.scaled"), dend_y_var=c("RNA.avg.exp.scaled","ADT.avg.exp.scaled"), dist_method="euclidean",hclust_method="ward.D", do.return = TRUE) # y dendrogram rotation r1=rotate_dot_plot_dendrogram(dotplot_output, axis_to_rotate = "y") # add x dendrogram rotation to previous result #r2=rotate_dot_plot_dendrogram(r1, axis_to_rotate = "x") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.