Skip to content

Can't add ggsurvplot to powerpoint document using ReporteRs if there is no risk table #314

@DrRZ

Description

@DrRZ

Expected behavior

Plot should be added to slide with no error.

Actual behavior

Plot is not added and get the error, "Error in grid.newpage() : pptx device only supports one page". Note, if risk.table = TRUE in the ggsurvplot object, there is no error and the expected behavior occurs.

Steps to reproduce the problem

Create a ggsurvplot object with the risk.table argument set to FALSE and store in variable x. Using the ReporteRs package, create a new slide in a powerpoint document and use the addPlot function to add x to the slide by setting the "fun" argument to function (x) {print(x, newpage = FALSE)}

session_info()

Session info ----------------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.5.0 (2018-04-23)
system x86_64, mingw32
ui Rgui
language (EN)
collate English_Canada.1252
tz America/New_York
date 2018-06-19

Packages --------------------------------------------------------------------------------------------------------------------------------
package * version date source
assertthat 0.2.0 2017-04-11 CRAN (R 3.5.0)
base * 3.5.0 2018-04-23 local
base64enc 0.1-3 2015-07-28 CRAN (R 3.5.0)
bindr 0.1.1 2018-03-13 CRAN (R 3.5.0)
bindrcpp * 0.2.2 2018-03-29 CRAN (R 3.5.0)
broom 0.4.4 2018-03-29 CRAN (R 3.5.0)
cmprsk 2.2-7 2014-06-17 CRAN (R 3.5.0)
colorspace 1.3-2 2016-12-14 CRAN (R 3.5.0)
compiler 3.5.0 2018-04-23 local
data.table 1.11.4 2018-05-27 CRAN (R 3.5.0)
datasets * 3.5.0 2018-04-23 local
devtools 1.13.5 2018-02-18 CRAN (R 3.5.0)
digest 0.6.15 2018-01-28 CRAN (R 3.5.0)
dplyr 0.7.5 2018-05-19 CRAN (R 3.5.0)
foreign 0.8-70 2017-11-28 CRAN (R 3.5.0)
gdtools * 0.1.7 2018-02-27 CRAN (R 3.5.0)
ggplot2 * 2.2.1 2016-12-30 CRAN (R 3.5.0)
ggpubr * 0.1.6 2017-11-14 CRAN (R 3.5.0)
glue 1.2.0 2017-10-29 CRAN (R 3.5.0)
graphics * 3.5.0 2018-04-23 local
grDevices * 3.5.0 2018-04-23 local
grid 3.5.0 2018-04-23 local
gridExtra 2.3 2017-09-09 CRAN (R 3.5.0)
gtable 0.2.0 2016-02-26 CRAN (R 3.5.0)
htmltools 0.3.6 2017-04-28 CRAN (R 3.5.0)
httpuv 1.4.3 2018-05-10 CRAN (R 3.5.0)
km.ci 0.5-2 2009-08-30 CRAN (R 3.5.0)
KMsurv 0.1-5 2012-12-03 CRAN (R 3.5.0)
knitr 1.20 2018-02-20 CRAN (R 3.5.0)
labeling 0.3 2014-08-23 CRAN (R 3.5.0)
later 0.7.3 2018-06-08 CRAN (R 3.5.0)
lattice 0.20-35 2017-03-25 CRAN (R 3.5.0)
lazyeval 0.2.1 2017-10-29 CRAN (R 3.5.0)
magrittr * 1.5 2014-11-22 CRAN (R 3.5.0)
Matrix 1.2-14 2018-04-13 CRAN (R 3.5.0)
memoise 1.1.0 2017-04-21 CRAN (R 3.5.0)
methods * 3.5.0 2018-04-23 local
mime 0.5 2016-07-07 CRAN (R 3.5.0)
mnormt 1.5-5 2016-10-15 CRAN (R 3.5.0)
munsell 0.5.0 2018-06-12 CRAN (R 3.5.0)
nlme 3.1-137 2018-04-07 CRAN (R 3.5.0)
officer 0.3.1 2018-06-12 CRAN (R 3.5.0)
parallel 3.5.0 2018-04-23 local
pillar 1.2.3 2018-05-25 CRAN (R 3.5.0)
pkgconfig 2.0.1 2017-03-21 CRAN (R 3.5.0)
plyr 1.8.4 2016-06-08 CRAN (R 3.5.0)
png 0.1-7 2013-12-03 CRAN (R 3.5.0)
promises 1.0.1 2018-04-13 CRAN (R 3.5.0)
psych 1.8.4 2018-05-06 CRAN (R 3.5.0)
purrr 0.2.5 2018-05-29 CRAN (R 3.5.0)
R.methodsS3 1.7.1 2016-02-16 CRAN (R 3.5.0)
R.oo 1.22.0 2018-04-22 CRAN (R 3.5.0)
R.utils 2.6.0 2017-11-05 CRAN (R 3.5.0)
R6 2.2.2 2017-06-17 CRAN (R 3.5.0)
Rcpp 0.12.17 2018-05-18 CRAN (R 3.5.0)
ReporteRs * 0.8.10 2018-03-28 CRAN (R 3.5.0)
ReporteRsjars * 0.0.4 2018-03-28 CRAN (R 3.5.0)
reshape2 1.4.3 2017-12-11 CRAN (R 3.5.0)
rJava 0.9-10 2018-05-29 CRAN (R 3.5.0)
rlang 0.2.1 2018-05-30 CRAN (R 3.5.0)
rvg 0.1.9 2018-06-10 CRAN (R 3.5.0)
scales 0.5.0 2017-08-24 CRAN (R 3.5.0)
shiny 1.1.0 2018-05-17 CRAN (R 3.5.0)
splines 3.5.0 2018-04-23 local
stats * 3.5.0 2018-04-23 local
stringi 1.1.7 2018-03-12 CRAN (R 3.5.0)
stringr 1.3.1 2018-05-10 CRAN (R 3.5.0)
survival * 2.41-3 2017-04-04 CRAN (R 3.5.0)
survminer * 0.4.2 2018-01-31 CRAN (R 3.5.0)
survMisc 0.5.4 2016-11-23 CRAN (R 3.5.0)
tibble 1.4.2 2018-01-22 CRAN (R 3.5.0)
tidyr 0.8.1 2018-05-18 CRAN (R 3.5.0)
tidyselect 0.2.4 2018-02-26 CRAN (R 3.5.0)
tools 3.5.0 2018-04-23 local
utils * 3.5.0 2018-04-23 local
uuid 0.1-2 2015-07-28 CRAN (R 3.5.0)
withr 2.1.2 2018-03-15 CRAN (R 3.5.0)
xml2 1.2.0 2018-01-24 CRAN (R 3.5.0)
xtable 1.8-2 2016-02-05 CRAN (R 3.5.0)
zip 1.0.0 2017-04-25 CRAN (R 3.5.0)
zoo 1.8-2 2018-06-11 CRAN (R 3.5.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions