Running examples in 'jjAnno-Ex.R' failed
The error most likely occurred in:

> ### Name: annoRect
> ### Title: annoRect
> ### Aliases: annoRect
> 
> ### ** Examples
> 
> # ===============================
> # test function
> 
> # load data
> data(p)
> data(pgo)
> data(pdotfc)
> 
> # default plot
> annoRect(object = p,
+          annoPos = 'top',
+          xPosition = c(1:10))
[1] "This palatte have 20 colors!"
[1] "This palatte have 20 colors!"
[1] "This palatte have 20 colors!"
> 
> # you can set y axis no expand
> annoRect(object = p,
+          annoPos = 'top',
+          xPosition = c(1:10)) +
+   ggplot2::scale_y_discrete(expand = c(0,0))
[1] "This palatte have 20 colors!"
[1] "This palatte have 20 colors!"
[1] "This palatte have 20 colors!"
> 
> # adjust yPosition
> annoRect(object = p,
+          annoPos = 'top',
+          xPosition = c(1:10),
+          yPosition = c(11,11.5))
[1] "This palatte have 20 colors!"
[1] "This palatte have 20 colors!"
[1] "This palatte have 20 colors!"
> 
> # another example annotation GO terms
> annoRect(object = pgo,
+         annoPos = 'right',
+         yPosition = c(1:15),
+         pCol = rep('transparent',15),
+         pFill = rep(c('#F5F0BB','#C4DFAA','#90C8AC'),each = 5),
+         xPosition = c(3,9.5),
+         rectWidth = 1)
[1] "This palatte have 20 colors!"
Error in `new_mapped_discrete()`:
! `as.vector(x)` must be a vector with type <double>.
Instead, it has type <integer>.
Backtrace:
     ▆
  1. └─jjAnno::annoRect(...)
  2.   ├─base::print(object)
  3.   └─ggplot2:::print.ggplot(object)
  4.     ├─ggplot2::ggplot_build(x)
  5.     └─ggplot2:::ggplot_build.ggplot(x)
  6.       └─layout$map_position(data)
  7.         └─ggplot2 (local) map_position(..., self = self)
  8.           └─base::lapply(...)
  9.             └─ggplot2 (local) FUN(X[[i]], ...)
 10.               └─ggplot2:::scale_apply(layer_data, y_vars, "map", SCALE_Y, self$panel_scales_y)
 11.                 └─base::lapply(...)
 12.                   └─ggplot2 (local) FUN(X[[i]], ...)
 13.                     └─base::lapply(...)
 14.                       └─ggplot2 (local) FUN(X[[i]], ...)
 15.                         └─scales[[i]][[method]](data[[var]][scale_index[[i]]])
 16.                           └─ggplot2 (local) map(..., self = self)
 17.                             └─ggplot2:::new_mapped_discrete(x)
 18.                               └─vctrs::vec_assert(as.vector(x), double())
 19.                                 └─rlang::abort(...)
Execution halted