When trying to run tbl_uvregression
from gtsummary
with the following code:
tbl_uvregression(
database,
method=survival::coxph,
y = Surv(time = survival, event = status),
exponentiate = TRUE)
I get the following error:
Error: C stack usage 15927472 is too close to the limit
The database is pretty large (187 observations of 102 variables, a univariate Cox analysis to be performed for each of them) but not as heavy to handle as that!
Here is my c stack info:
Cstack_info()
size current direction eval_depth
15922790 20424 1 2
When the database is split in two (187 observations, 50 variables), I can run tbl_uvregression
but I can't merge the 2 produced files for the same reason as above. "C stack is too cloose to the limit".
tblcox1 <- tbl_uvregression(
database_part1,
method=survival::coxph,
y = Surv(time = survival, event = status),
exponentiate = TRUE)
tblcox2 <- tbl_uvregression(
database_part2,
method=survival::coxph,
y = Surv(time = survival, event = status),
exponentiate = TRUE)
object.size(tblcox1) %>% format(units = "Mb")
[1] "120.9 Mb"
object.size(tblcox2) %>% format(units = "Mb")
[1] "102.9 Mb"
tblcox1_butch <- tbl_butcher(tblcox1)
object.size(tblcox1_butch) %>% format(units = "Mb")
[1] "45.3 Mb"
tblcox2_butch <- tbl_butcher(tblcox2)
object.size(tblcox2_butch) %>% format(units = "Mb")
[1] "38.8 Mb"
tbl_stack(list(tblcox1_butch, tblcox2_butch))
Error: C stack usage 15927472 is too close to the limit
tbl_merge(list(tblcox1_butch, tblcox2_butch))
Error: C stack usage 15927472 is too close to the limit
Is there anything I can do to increase my c stack (or another tweak) to run my tbl_uvregression
properly?