mooreryan / featuretable

MIT License
1 stars 1 forks source link

replace_zeros() throws an error if the input data is a data.frame not a matrix #1

Open mooreryan opened 3 years ago

mooreryan commented 3 years ago

It's because of the ifelse function.

https://github.com/mooreryan/featuretable/blob/083f3f506a68762c288fca85a6718eae4d1b2568/R/feature_table.R#L1651

Need to change it to something that also works with data frames.

mooreryan commented 1 year ago

Or, need to convert the input into a matrix when calling FeatureTable$new.

One thing that always triggers this is when converting from a tibble going straight into the new method. As of now, user needs to remember to convert it to a matrix manually.