Thank you soo much!! That worked!
If you don't mind me asking, when I run:
o.ifm <- scde.error.models(counts = cd, groups = sg, n.cores = 10, threshold.segmentation = TRUE, save.crossfit.plots = FALSE, save.model.plots = FALSE, verbose = 1)
I am getting the error that arguments must have same length and error in tapply(...){. Which arguments does it refer to?