nicolaroberts / hdp

R pkg for Hierarchical Dirichlet Process
Other
73 stars 31 forks source link

Fix bug for input datatype #5

Open ginkyenglee opened 1 year ago

ginkyenglee commented 1 year ago

In the existing code, when the class(data) is a matrix, the condition of the if statement becomes (FALSE, TRUE), and in the case of data.frame, the condition of the if statement becomes (TRUE, FASLE), causing problems such as this issue.

Therefore, all is added to return TRUE when the condition of the if statement is (TRUE,TRUE), that is, when class(data) is not data.frame or matrix.

FridljDa commented 7 months ago

Thanks for providing the bug fix :D would be great to merge this into the main branch