r-使用记者库的警告消息

  • 本文关键字:警告 消息 r reporters
  • 更新时间 :
  • 英文 :


我在使用记者生成pptx文件时会收到下一个警告消息:

Warning: System font `Calibri` not found. Closest match: `DejaVu Sans`
Warning: System font `Times New Roman` not found. Closest match: `TeX Gyre Termes`
Warning: System font `Courier New` not found. Closest match: `TeX Gyre Cursor`
Warning: System font `Symbol` not found. Closest match: `DejaVu Sans`

这是我的代码:

library(ReporteRs)
 informe_ob <- pptx(template = 'plantilla_reporte_ejecutivo_ob.pptx')
  informe_ob <- addSlide(informe_ob,"layout_informe_ob")
  slide.layouts(informe_ob)
  slide.layouts(informe_ob, "layout_informe_ob")
  informe_ob <- addPlot(informe_ob, function( ) print(p1()), vector.graphic = TRUE)
  informe_ob <- addPlot(informe_ob, function( ) print(p2()), vector.graphic = TRUE)
  informe_ob <- addFlexTable( informe_ob, flextable = flex_table_ob())
  informe_ob <- addParagraph(informe_ob,as.character(today))
  informe_ob <- addParagraph(informe_ob,as.character(fecha_titulos))
  informe_ob <- addParagraph(informe_ob,as.character(tabla_ob()))
  informe_ob <- addFlexTable( informe_ob, flextable = flex_entorno())
  informe_ob <- addFlexTable( informe_ob, flextable = flex_colectora())
  writeDoc(informe_ob, paste("Reporte_Ejecutivo_",tabla_ob(),"_",fecha_nombre_informe,".pptx",sep = ""))

由于这个问题,我的应用有时会失败。有人知道我可以解决吗?

预先感谢您!

更新II:sessionInfo包括库版本

 sessionInfo()
 R version 3.4.0 (2017-04-21)
 Platform: x86_64-pc-linux-gnu (64-bit)
 Running under: Debian GNU/Linux 9 (stretch)
 Matrix products: default
 BLAS: /usr/lib/libblas/libblas.so.3.7.0
 LAPACK: /usr/lib/lapack/liblapack.so.3.7.0
 locale:
 [1] LC_CTYPE=es_ES.UTF-8          LC_NUMERIC=C
 [3] LC_TIME=es_ES.UTF-8           LC_COLLATE=es_ES.UTF-8
 [5] LC_MONETARY=es_ES.UTF-8       LC_MESSAGES=es_ES.UTF-8
 [7] LC_PAPER=es_ES.UTF-8          LC_NAME=es_ES.UTF-8
 [9] LC_ADDRESS=es_ES.UTF-8        LC_TELEPHONE=es_ES.UTF-8
 [11] LC_MEASUREMENT=es_ES.UTF-8    LC_IDENTIFICATION=es_ES.UTF-8
 attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
other attached packages:
[1] gdtools_0.1.4        sendmailR_1.2-1      rJava_0.9-8
[4] ReporteRs_0.8.8      ReporteRsjars_0.0.2  ggplot2_2.2.1
[7] DT_0.2               shinyWidgets_0.3.0   shinydashboard_0.6.1
[10] bindrcpp_0.2         zoo_1.8-0            dplyr_0.7.1
[13] shiny_1.0.3
loaded via a namespace (and not attached):
[1] zip_1.0.0         Rcpp_0.12.10      compiler_3.4.0    plyr_1.8.4
[5] bindr_0.1         base64enc_0.1-3   R.methodsS3_1.7.1 R.utils_2.5.0
[9] tools_3.4.0       uuid_0.1-2        digest_0.6.12     jsonlite_1.4
[13] tibble_1.3.3      gtable_0.2.0      lattice_0.20-35   png_0.1-7
[17] pkgconfig_2.0.1   rlang_0.1.1       yaml_2.1.14       stringr_1.2.0
[21] knitr_1.15.1      xml2_1.1.1        officer_0.1.5         htmlwidgets_0.9
[25] grid_3.4.0        glue_1.1.1        R6_2.2.1          rvg_0.1.4
[29] reshape2_1.4.2    purrr_0.2.2.2     magrittr_1.5      scales_0.4.1
[33] htmltools_0.3.6   assertthat_0.2.0  mime_0.5          xtable_1.8-2
[37] colorspace_1.3-2  httpuv_1.3.3      labeling_0.3      stringi_1.1.5
[41] lazyeval_0.2.0    munsell_0.4.3     Cairo_1.5-9       R.oo_1.21.0

您需要为fontname_serif,fontname_sans,fontname_mono,fontname_symbol指定参数,以便它们指向系统上的现有字体名称。请参阅https://davidgohel.github.io/reporters/reference/addplot.html

您可以使用gdtools::sys_fonts()

相关内容

  • 没有找到相关文章

最新更新