Fixed formatMult so that input Julian date (JD)/visit chronology information is not converted to factor when it is not, in fact, a factor. When factor variables are present as additional covariates, the JD/visit chronology variable was coerced to a factor as the intermediate array could only store data with a single mode --- in this case a "character" mode subsequently converted into a factor. Other non-factor variables are returned to their original mode. The function now checks the the mode of the JD/visit variable and restores it to its original mode if not a factor.
Fixed
formatMult
so that input Julian date (JD)/visit chronology information is not converted to factor when it is not, in fact, a factor. When factor variables are present as additional covariates, the JD/visit chronology variable was coerced to a factor as the intermediate array could only store data with a single mode --- in this case a "character" mode subsequently converted into a factor. Other non-factor variables are returned to their original mode. The function now checks the the mode of the JD/visit variable and restores it to its original mode if not a factor.Unit test updated as well.