Kanaries / GWalkR

Turn your data frame into a tableau style drag and drop UI interface to build visualization in R.
Apache License 2.0
376 stars 34 forks source link

C stack usage error #18

Open joelem opened 1 month ago

joelem commented 1 month ago

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 commented 1 month ago

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) `