Combination analysis help in R

61 views Asked by At

Essentially, I have a dataframe of 300 patients each with 25 recorded variables. I am trying to work out the most common combinations of these variables using the UpsetR package which worked fine for me previously when I did the same for another dataframe with the same number of patients and 14 variables. However, now I keep getting an errors saying (as well as it taking 4hours to compile the code just for me to get this error:


Error: vector memory exhausted (limit reached?)
Error during wrapup: vector memory exhausted (limit reached?)
Error: no more error handlers available (recursive errors?); invoking 'abort' restart

Is this just due to the fact that there is too many combinations/ too many sets that it can't compute the combinations.

Here is the code:


  UpSetR::upset(
    sets = c("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o","p", "q", "r", "s", "t", "u", "v", "w", "x", "y"),
    order.by = "freq",
    empty.intersections = "on",
    nintersects = 10,
    nsets = 20,
    number.angles = 0,
    point.size = 3.5,
    line.size = 2, 
    mainbar.y.label = "Professionals Combinations",
    sets.x.label = "Patient frequency") 

I am a newb with R and havent been able to understand completely what nsets and nintersects and empty.intersections mean from the documentation and unsure if this could have an underpinning to solving my problem. Could it be that I could change some of these functions which might allow me to actually calculate the combinations?

If this doesnt work, how would you try to go around this issue.

Any advice would be great.

0

There are 0 answers