admin管理员组文章数量:1122832
I am working with R in VS code and I am facing this error whenever I want to view tbl_df from read_sav function.
Error: C stack usage 7956480 is too close to the limit
Interestingly, I don't get this error on R Studio.
Here is a reproducible example:
library(haven)
path <- system.file("examples", "iris.sav", package = "haven")
df <- read_sav(path)
view(df)
Changing to data.frame doesn't solve the issue.
Update:
sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS 15.1.1
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/London
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] haven_2.5.4
loaded via a namespace (and not attached):
[1] utf8_1.2.4 R6_2.5.1 tzdb_0.4.0 magrittr_2.0.3
[5] glue_1.8.0 tibble_3.2.1 pkgconfig_2.0.3 lifecycle_1.0.4
[9] readr_2.1.5 cli_3.6.3 fansi_1.0.6 vctrs_0.6.5
[13] compiler_4.4.1 forcats_1.0.0 hms_1.1.3 pillar_1.9.0
[17] rlang_1.1.4 jsonlite_1.8.9
Thanks.
I am working with R in VS code and I am facing this error whenever I want to view tbl_df from read_sav function.
Error: C stack usage 7956480 is too close to the limit
Interestingly, I don't get this error on R Studio.
Here is a reproducible example:
library(haven)
path <- system.file("examples", "iris.sav", package = "haven")
df <- read_sav(path)
view(df)
Changing to data.frame doesn't solve the issue.
Update:
sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS 15.1.1
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/London
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] haven_2.5.4
loaded via a namespace (and not attached):
[1] utf8_1.2.4 R6_2.5.1 tzdb_0.4.0 magrittr_2.0.3
[5] glue_1.8.0 tibble_3.2.1 pkgconfig_2.0.3 lifecycle_1.0.4
[9] readr_2.1.5 cli_3.6.3 fansi_1.0.6 vctrs_0.6.5
[13] compiler_4.4.1 forcats_1.0.0 hms_1.1.3 pillar_1.9.0
[17] rlang_1.1.4 jsonlite_1.8.9
Thanks.
Share Improve this question edited Nov 28, 2024 at 14:48 MIM asked Nov 22, 2024 at 13:50 MIMMIM 11 silver badge1 bronze badge 1- That means you ran out of memory. If this is unexpected, then you probably have fallen into a recursion. – Bastián Olea Herrera Commented Nov 23, 2024 at 12:32
2 Answers
Reset to default 2Have you tried uppercase View(df)
? I'm not sure where the lowercase view
comes from but it doesn't come from haven. But where ever it comes from it sounds like it's recursively calling itself.
I had the same problem. No Idea what causes it. But what helped me was saving the df as csv and then loading it in again. No more problems!
本文标签: rError C stack usage is too close to the limit (readsav)Stack Overflow
版权声明:本文标题:r - Error: C stack usage is too close to the limit (read_sav) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736303397a1931871.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论