Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C stack usage error #18

Open
joelem opened this issue Aug 7, 2024 · 1 comment
Open

C stack usage error #18

joelem opened this issue Aug 7, 2024 · 1 comment

Comments

@joelem
Copy link

joelem commented Aug 7, 2024

Awesome package idea, very excited to be able to use it!

A potential bug: when I create a data frame from reading in a .sav dataset (using the "haven" package, read_spss), the gwalkr() function outputs:
"Error: C stack usage [big number here] is too close to the limit"

However, if I write out the same data frame as a .csv (using write_csv) and re-read it back in, the function works as intended.

Not sure what information is stripped by the write_csv function (or if the read_spss reads it in an incompatible format), but it helps the gwalkr function read data from a .sav file correctly.

Example:
Using the exercise.sav from here

dat <- haven::read_spss("~/Desktop/exercise.sav") GWalkR::gwalkr(dat)

@joelem
Copy link
Author

joelem commented Aug 8, 2024

Figured it out in case anyone has this issue:

You need to strip the haven added labels

`
library(haven)
library(GWalkR)

dat <- read_spss("~/Desktop/exercise.sav") %>%
zap_labels(., "format.spss")

gwalkr(dat)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant