Closed AMChalkie closed 4 years ago
Instead of adding a parameter, you can assign the output of the function to a variable to have a ggplot object, like the following code.
library(CB2)
data(Evers_CRISPRn_RT112)
cpm <- get_CPM(Evers_CRISPRn_RT112$count)
obj <- plot_count_distribution(cpm, Evers_CRISPRn_RT112$design)
summary(obj)
The output of the code shows that obj
is a ggplot object.
data: sgRNA, sample_name, count, group [5766x4]
mapping: x = ~count
faceting: <ggproto object: Class FacetWrap, Facet, gg>
compute_layout: function
draw_back: function
draw_front: function
draw_labels: function
draw_panels: function
finish_data: function
init_scales: function
map_data: function
params: list
setup_data: function
setup_params: function
shrink: TRUE
train_scales: function
vars: function
super: <ggproto object: Class FacetWrap, Facet, gg>
-----------------------------------
mapping: fill = ~group
geom_density: na.rm = FALSE
stat_density: na.rm = FALSE
position_identity
Correct me if I am wrong.
Thank you,
Hyun-Hwan Jeong
add option to return the ggplot object to user