Error: C stack usage 7974692 is too close to the limit with

When typing this Q I found several other posts around this, looks like it's pretty unanswerable :frowning:




I'm posting this question on the back of a SO post over here.

I'm running rstudio in a docker container rocker/tidyverse.

Simple r block:

strtime_to_dt <- function(x) {format(strtime_to_dt(x), "%F %H:%M:%OS3")}
v1 <- c("1605859226452", "1605859226461", "1605859248803", "1605859261112",  "1605859283839", "1605859471370")
format(strtime_to_dt(v1), "%F %H:%M:%OS3")
Error: C stack usage  7972180 is too close to the limit

Goal it to get datetime vector returned to the millisecond.

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04 LTS

Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C              LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3    tinytex_0.27   xfun_0.19     

Not sure what other info to provide. Is there any other way to get the result I'm looking for?

In the unices there is an environment variable ulimit that increases the amount of RAM made available to programs; the default is often near 8GB. A search for ulimit windows 10 may help. I can't answer questions specifically related to WIN

Good on you. Check

man ulimit

on upping the constraint. Come back with more questions.

1 Like

This is a recursive function that calls it self and therefore would blow any stack

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Thanks for the info but I'm on Ubuntu not Win!