diff --git a/DESCRIPTION b/DESCRIPTION index ffd15e4..8c73eaf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -11,13 +11,14 @@ Description: For many times, we are not just aligning plots as what 'cowplot' an Depends: R (>= 4.1.0) Imports: - ggfun (>= 0.1.3), - ggplot2, - ggplotify, - patchwork, - magrittr, - methods, - utils + ggfun (>= 0.1.3), + ggplot2, + ggplotify, + patchwork, + magrittr, + methods, + utils, + yulab.utils (>= 0.1.9) Suggests: ggtree URL: https://github.com/YuLab-SMU/aplot, https://yulab-smu.top/aplot/ diff --git a/R/insertion.R b/R/insertion.R index 963be19..e01f2da 100644 --- a/R/insertion.R +++ b/R/insertion.R @@ -42,6 +42,9 @@ insert_left <- function(.data, plot, width=1) { ##' @rdname plot-insertion ##' @export insert_right <- function(.data, plot, width=1) { + + yulab.utils:::.crap(n=2L, fn = 'oncoplot') + insert_lr(.data = .data, plot = plot, width = width, side = "right") } @@ -102,6 +105,9 @@ insert_lr <- function(.data, plot, width, side) { ##' @rdname plot-insertion ##' @export insert_top <- function(.data, plot, height=1) { + + yulab.utils:::.crap(n=2L, fn = 'oncoplot') + insert_tb(.data = .data, plot = plot, height = height, side = "top") } @@ -110,6 +116,9 @@ insert_top <- function(.data, plot, height=1) { ##' @rdname plot-insertion ##' @export insert_bottom <- function(.data, plot, height=1) { + + yulab.utils:::.crap(n=2L, fn = 'oncoplot') + insert_tb(.data = .data, plot = plot, height = height, side = "bottom") }