Giter Site home page Giter Site logo

Comments (13)

gdemin avatar gdemin commented on June 17, 2024 2

@bkerwick I have reproduced this issue. It seems this bug is Windows specific. Currently I don't know why this happens. Will investigate further.

from expss.

wck01 avatar wck01 commented on June 17, 2024 1

Thank you so much, @JB0207, for your valuable comment. Your suggestion to use the "TryCatch function with Repeat" worked perfectly for me. I appreciate your time and effort in helping me with this issue.

from expss.

gdemin avatar gdemin commented on June 17, 2024

Thank you for the detailed description. Could you provide the full result of the sessionInfo()? I need to see the list of attached packages. There is no such information in your screenshot.

from expss.

bkerwick avatar bkerwick commented on June 17, 2024

Sorry about that here you go

Screenshot 2023-03-23 at 11 06 36 AM

from expss.

gdemin avatar gdemin commented on June 17, 2024

I have run your code several times and didn't see any errors. Also tried with loaded dplyr with the same result. As far as I can see in the "attached packages" you load other packages except the expss. Could you give me all the code with library's  which you execute before running the code above?

from expss.

bkerwick avatar bkerwick commented on June 17, 2024

I use macos but today i tried a fresh install of R on windows, installed expss and it's dependencies. Ran the code without doing anything else and below occurred. I hope this helps

envir

from expss.

bkerwick avatar bkerwick commented on June 17, 2024

Was this what you were looking for?
Were you not able to recreate the error?

from expss.

quicly avatar quicly commented on June 17, 2024

I also encountered this issue today. I couldn't figure out what might be causing it, but it seems to be somehow related to unexpected behavior of the "/" character in value labels. Removing them has prevented this error, but I haven't tested it further yet, maybe it is just a coincidence, as this error was pretty random for me.

from expss.

JB0207 avatar JB0207 commented on June 17, 2024

I also recently ran into the error when trying to create a crosstab with 208 variables in tab_cells and 16 in tab_cols. Removing "/" character did not solve the problem for me. I have observed that the error becomes more likely the more variables you include.

I wrote a code with trycatch as a temporary solution, so that I don't always have to re-run the code myself until it works. For the above scenario it took 7 tries until I got the record/table. Maybe it helps someone:

c = 0 # set counter to zero

repeat{
        
    error <- FALSE
    print(c)
    
    tryCatch(my_table <- datasetSAV %>%
               tab_cells(X1,
                             X2
               ) %>%
               tab_cols(total(),
                             X3,
                             X4
               ) %>%
               tab_stat_cases(label = "N", total_row_position = "above") %>%
               tab_stat_cpct(label="%", total_statistic = "w_cpct", total_label = "#Total cases") %>%
               tab_pivot(stat_position = "inside_columns") %>%
               drop_empty_rows() %>%
               drop_empty_columns(), 
               error = function(e){ error <<- TRUE})

    if(error == FALSE){ break } 
  
    if(c == 10){ break}
  
    c = c + 1
    print("Error")

 }

@gdemin Many thanks for your efforts and the great package!

from expss.

Waschoi avatar Waschoi commented on June 17, 2024

I also encountered this issue today. I couldn't figure out what might be causing it, but it seems to be somehow related to unexpected behavior of the "/" character in value labels. Removing them has prevented this error, but I haven't tested it further yet, maybe it is just a coincidence, as this error was pretty random for me.

I tried this approch and had no success. There problem seems to be somewhere else

from expss.

Waschoi avatar Waschoi commented on June 17, 2024

I forked your package and changed these 2 lines:
master...Waschoi:expss:master
Maybe this could be done as an option, but I am not clever enough to figure this out.

This works well for me.

from expss.

gdemin avatar gdemin commented on June 17, 2024

@Waschoi
Thank you for your investigation but I can't use this workaround in the CRAN version.

You removed the check for label code duplication. And duplicated codes in value labels can produce unpredictable bugs in further processing, such as table creation.

from expss.

Waschoi avatar Waschoi commented on June 17, 2024

This was not intended to be a permanent solution, but rather a good workaround for me. As soon as there is a real fix, I would use your version again. The bug really drove us crazy because it is not reproducible.

from expss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.