hputter / mstate

https://hputter.github.io/mstate/
7 stars 5 forks source link

data type issues with msprep #9

Closed andrepist closed 3 years ago

andrepist commented 3 years ago

Hi, I came across two data type incompatibilities when using msprep.

First, my status column was made of factors and I had to convert them to integer, otherwise the mres matrix from msprepEngine was not created since the program was not able to compute Tstop * 1/stat (they were interpreted as characters). Second, my ids were characters and I had to convert them either to factor or to recode them as integer, otherwise the mres matrix was a character matrix and the computation msres$Tstop - msres$Tstart was not possible either.

May I suggest to specify the accepted data type in the documentation or to put some conversion within the code?

Thank you and really nice work with this package!

edbonneville commented 3 years ago

Hi @andrepist - sorry for the (very) late reply! Regarding the two points:

edbonneville commented 3 years ago

Fixed (finally) with latest CRAN release of 0.3.2.