Error in bl_make_text_box(token, drawing_context$gp, drawing_context$yoff_pt) : function 'Rcpp_precious_remove' not provided by package 'Rcpp'

目录

Error in bl_make_text_box(token, drawing_context$gp, drawing_context$yoff_pt) : function 'Rcpp_precious_remove' not provided by package 'Rcpp'

问题:

解决:

完整错误:


问题:

ggsurvplot(fit, pval = TRUE, conf.int = TRUE,risk.table = TRUE, risk.table.y.text.col = TRUE)

解决:

install.packages("Rcpp")
library(Rcpp)
# Add risk table
# and change risk table y text colors by strata
ggsurvplot(fit, pval = TRUE, conf.int = TRUE,risk.table = TRUE, risk.table.y.text.col = TRUE)

完整错误:

ERROR while rich displaying an object: Error in bl_make_text_box(token, drawing_context$gp, drawing_context$yoff_pt): 程序包'Rcpp_precious_remove'不提供'Rcpp'这样的函数

Traceback:
1. FUN(X[[i]], ...)
2. tryCatch(withCallingHandlers({
 .     if (!mime %in% names(repr::mime2repr)) 
 .         stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
 .     rpr <- repr::mime2repr[[mime]](obj)
 .     if (is.null(rpr)) 
 .         return(NULL)
 .     prepare_content(is.raw(rpr), rpr)
 . }, error = error_handler), error = outer_handler)
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. doTryCatch(return(expr), name, parentenv, handler)
6. withCallingHandlers({
 .     if (!mime %in% names(repr::mime2repr)) 
 .         stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
 .     rpr <- repr::mime2repr[[mime]](obj)
 .     if (is.null(rpr)) 
 .         return(NULL)
 .     prepare_content(is.raw(rpr), rpr)
 . }, error = error_handler)
7. repr::mime2repr[[mime]](obj)
8. repr_text.default(obj)
9. paste(capture.output(print(obj)), collapse = "\n")
10. capture.output(print(obj))
11. withVisible(...elt(i))
12. print(obj)
13. print.ggsurvplot(obj)
14. .build_ggsurvplot(x = x, surv.plot.height = surv.plot.height, 
  .     risk.table.height = risk.table.height, ncensor.plot.height = ncensor.plot.height)
15. ggplotGrob(plots[[i]])
16. ggplot_gtable(ggplot_build(x))
17. ggplot_gtable.ggplot_built(ggplot_build(x))
18. layout$render(geom_grobs, data, theme, plot$labels)
19. f(..., self = self)
20. self$facet$draw_panels(panels, self$layout, self$panel_scales_x, 
  .     self$panel_scales_y, self$panel_params, self$coord, data, 
  .     theme, self$facet_params)
21. f(...)
22. coord$render_axis_v(range, theme)
23. f(...)
24. panel_guides_grob(panel_params$guides, position = "left", theme = theme)
25. guide_gengrob(guide, theme)
26. guide_gengrob.axis(guide, theme)
27. draw_axis(break_positions = guide$key[[aesthetic]], break_labels = guide$key$.label, 
  .     axis_position = guide$position, theme = theme, check.overlap = guide$check.overlap, 
  .     angle = guide$angle, n.dodge = guide$n.dodge)
28. lapply(dodge_indices, function(indices) {
  .     draw_axis_labels(break_positions = break_positions[indices], 
  .         break_labels = break_labels[indices], label_element = label_element, 
  .         is_vertical = is_vertical, check.overlap = check.overlap)
  . })
29. FUN(X[[i]], ...)
30. draw_axis_labels(break_positions = break_positions[indices], 
  .     break_labels = break_labels[indices], label_element = label_element, 
  .     is_vertical = is_vertical, check.overlap = check.overlap)
31. exec(element_grob, label_element, `:=`(!!position_dim, break_positions), 
  .     `:=`(!!label_margin_name, TRUE), label = break_labels, check.overlap = check.overlap)
32. (function (element, ...) 
  . {
  .     UseMethod("element_grob")
  . })(structure(list(family = "", face = "plain", size = 12, colour = c(`sex=2` = "#00BFC4", 
  . `sex=1` = "#F8766D"), fill = NULL, box.colour = NULL, linetype = NULL, 
  .     linewidth = NULL, hjust = 1, vjust = 0.5, halign = NULL, 
  .     valign = NULL, angle = 0, lineheight = 0.9, margin = structure(c(0, 
  .     2.4, 0, 0), unit = 8L, class = c("margin", "simpleUnit", 
  .     "unit", "unit_v2")), padding = NULL, r = NULL, align_widths = NULL, 
  .     align_heights = NULL, rotate_margins = NULL, debug = FALSE, 
  .     inherit.blank = FALSE), class = c("element_markdown", "element_text", 
  . "element")), y = structure(c(0.272727272727273, 0.727272727272727
  . ), unit = 4L, class = c("simpleUnit", "unit", "unit_v2")), margin_x = TRUE, 
  .     label = c("sex=2", "sex=1"), check.overlap = FALSE)
33. element_grob.element_markdown(structure(list(family = "", face = "plain", 
  .     size = 12, colour = c(`sex=2` = "#00BFC4", `sex=1` = "#F8766D"
  .     ), fill = NULL, box.colour = NULL, linetype = NULL, linewidth = NULL, 
  .     hjust = 1, vjust = 0.5, halign = NULL, valign = NULL, angle = 0, 
  .     lineheight = 0.9, margin = structure(c(0, 2.4, 0, 0), unit = 8L, class = c("margin", 
  .     "simpleUnit", "unit", "unit_v2")), padding = NULL, r = NULL, 
  .     align_widths = NULL, align_heights = NULL, rotate_margins = NULL, 
  .     debug = FALSE, inherit.blank = FALSE), class = c("element_markdown", 
  . "element_text", "element")), y = structure(c(0.272727272727273, 
  . 0.727272727272727), unit = 4L, class = c("simpleUnit", "unit", 
  . "unit_v2")), margin_x = TRUE, label = c("sex=2", "sex=1"), check.overlap = FALSE)
34. richtext_grob(label, x = x, y = y, hjust = hj, vjust = vj, halign = halign, 
  .     valign = valign, rot = angle, padding = padding, margin = mrg$margin, 
  .     r = r, align_widths = align_widths, align_heights = align_heights, 
  .     gp = gp, box_gp = box_gp, debug = element$debug)
35. mapply(make_inner_box, text, halign, valign, use_markdown, gp_list, 
  .     SIMPLIFY = FALSE)
36. (function (text, halign, valign, use_markdown, gp) 
  . {
  .     if (use_markdown) {
  .         text <- markdown::markdownToHTML(text = text, options = c("use_xhtml", 
  .             "fragment_only"))
  .     }
  .     doctree <- read_html(paste0("<!DOCTYPE html>", text))
  .     drawing_context <- setup_context(gp = gp, halign = halign, 
  .         word_wrap = FALSE)
  .     boxlist <- process_tags(xml2::as_list(doctree)$html$body, 
  .         drawing_context)
  .     vbox_inner <- bl_make_vbox(boxlist, vjust = 0, width_policy = "native")
  .     vbox_inner
  . })(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]], dots[[4L]][[1L]], 
  .     dots[[5L]][[1L]])
37. process_tags(xml2::as_list(doctree)$html$body, drawing_context)
38. dispatch_tag(node[[i]], tags[i], drawing_context)
39. process_tag_p(node, drawing_context)
40. unlist(list(process_tags(node, drawing_context), process_tag_br(NULL, 
  .     drawing_context)), recursive = FALSE)
41. process_tags(node, drawing_context)
42. dispatch_tag(node[[i]], tags[i], drawing_context)
43. process_text(node, drawing_context)
44. lapply(tokens, function(token) {
  .     list(bl_make_text_box(token, drawing_context$gp, drawing_context$yoff_pt), 
  .         bl_make_regular_space_glue(drawing_context$gp))
  . })
45. FUN(X[[i]], ...)
46. bl_make_text_box(token, drawing_context$gp, drawing_context$yoff_pt)

参考:Risk tables in survminer not drawing ? RCPP error [duplicate]

参考:R

Error in bl_make_text_box(token, drawing_context$gp, drawing_context$yoff_pt) : function ‘Rcpp_preci相关推荐

  1. linux shell脚本无法执行,报错syntax error near unexpected token `$'\r''解决方法

    运行shell脚本时出现:syntax error near unexpected token `$'\r"的错误,一般是格式的问题,比如直接从txt文档拷贝过来的内容: 解决方法:sed ...

  2. -bash:syntax error near unexpected token '('

    在Xshell5中编写int main(int argc,char** argv)时, 出现-bash:syntax error near unexpected token '('  : 可是我是按照 ...

  3. syntax error near unexpected token

    2019独角兽企业重金招聘Python工程师标准>>> shell脚本,在自己机器上运行正常,给同事,运行报错syntax error near unexpected token ` ...

  4. 成功解决.sh: line 6: syntax error near unexpected token `do

    成功解决.sh: line 6: syntax error near unexpected token `do 目录 解决问题 解决思路 解决方法 T1.修改格式系统间不兼容的格式

  5. 成功解决bash syntax error near unexpected token from

    成功解决bash syntax error near unexpected token from 目录 解决问题 解决思路 解决方法 解决问题 -bash: syntax error near une ...

  6. shell if else 用法 syntax error near unexpected token `then'

    1.  错误 #!/bin/bash platform=$1 if[ "$platform" = "ibmaix64" ] then       echo &q ...

  7. shell编程报错:“syntax error near unexpected token `”

    今天写了个shell脚本,在自己机器上运行正常,给同事,运行报错syntax error near unexpected token `,左看右看shell脚本没有问题,没有办法google搜索,发现 ...

  8. svn之bash: syntax error near unexpected token `(‘ 解决办法

    1.问题 svn update *****/网易(杭州)网络有限公司SSL-20170623001 出现这个错误 bash: syntax error near unexpected token `( ...

  9. 记一次坑爹报错之旅 -bash: /etc/profile: line 11: syntax error near unexpected token

    昨晚修改了环境变量后,进行重置服务时 source /etc/profile 报错 [root@localhost etc]# source /etc/profile -bash: /etc/prof ...

最新文章

  1. LaTeX入门第二集!LaTeX的几个示例!
  2. 你真的了解WebSocket吗?
  3. iTerm2 的配置与美化
  4. intellij idea14.1 卡顿问题解决
  5. 04-插入操作更新操作删除操作
  6. 静态库.a和动态库.so的制作
  7. bzoj 1627: [Usaco2007 Dec]穿越泥地(BFS)
  8. springboot - 应用实践(2)第一个springboot应用
  9. 【Java】反射 Reflection
  10. java学生签到系统_学生签到系统.pdf
  11. bt4-pre-final下用spoonwep+spoonwpa破解wep或wpa加密的无线网络
  12. JS中使数组倒序排列
  13. 计算机软件系统两大类,详解计算机软件系统包括哪两大类
  14. 旋转矩阵和角速度之间的关系
  15. DNS服务器解析偶尔失败
  16. 微信公众号关注渠道来源
  17. 《Python之禅》的翻译和解释
  18. 【最优化问题】方法总结
  19. 自定义控件 自定义属性_自定义您的外壳
  20. 60行代码爬取知乎神回复,笑到停不下来

热门文章

  1. Java异常信息处理类
  2. find与findb
  3. HTML的标签描述10
  4. C++随笔(2007-07-09)
  5. java future 线程 状态_手把手带你了解Java线程的实现方式及生命周期原理
  6. jquery $.post 超时_jQuery介绍
  7. MIT中国博士生开发出第一套保护自动驾驶车辆的感知算法!
  8. 基于点云的三维物体表示与生成模型
  9. 全景图拼接算法实现与改进
  10. 基于PHP的图片共享网站设计,基于PHP实现的WEB图片共享系统(SQL数据库),毕业论文设计...