NikNakk / forestmodel

42 stars 13 forks source link

A warning message from changing the text_size #22

Closed yuemolin closed 4 years ago

yuemolin commented 4 years ago

Hi NikNakk, Thank you for your wonderful package!

A Warning message showed up when I trying to modify the text_size in format_options:

'Warning: Ignoring unknown aesthetics: x'

I'm not sure am I doing something wrong? I'm hoping you can help me with this, thanks! Here, I attached my code:

forest_model(model1,factor_separate_line = T,
             format_options = list(colour= "black", shape = 15, text_size = 20,fontsize=5, banded = T),
             theme = theme_forest())

BTW, I'm also wondering is there a way to modify the size of the point estimates?

ShixiangWang commented 4 years ago

Could you show your full comands with a minimal dataset?

yuemolin commented 4 years ago

My code is as below:

Cox.ppi = coxph(Surv(N, O) ~ A+B+C+D+E+G+H+I+J+K+L,
                weights = M, data = data)

library("forestmodel")
forest_model(Cox.ppi,factor_separate_line = T,
             format_options = list(colour= "black", shape = 15, text_size = 10, banded = T),
             theme = theme_forest())

And the data is attached. Thanks! test.txt

ShixiangWang commented 4 years ago

@yuemolin Please try:

data = read.csv("~/Downloads/test.txt")
library(survival)

Cox.ppi = coxph(Surv(N, O) ~ A+B+C+D+E+G+H+I+J+K+L,
                weights = M, data = data)

#library("forestmodel")
forest_model(Cox.ppi,
             format_options = forest_model_format_options(text_size = 3))
yuemolin commented 4 years ago

got it! Thank you so much

ShixiangWang commented 4 years ago

You are welcome, please close this issue if you have no further problem