RfastOfficial / Rfast

A collection of Rfast functions for data analysis. Note 1: The vast majority of the functions accept matrices only, not data.frames. Note 2: Do not have matrices or vectors with have missing data (i.e NAs). We do no check about them and C++ internally transforms them into zeros (0), so you may get wrong results. Note 3: In general, make sure you give the correct input, in order to get the correct output. We do no checks and this is one of the many reasons we are fast.
143 stars 19 forks source link

Consistent use of na.rm #42

Closed waynelapierre closed 3 years ago

waynelapierre commented 3 years ago

colmeans does not have an na.rm argument while colMedian has one. It makes more sense to use it consistently. In addition, to make the Rfast functions applicable to data.frame, I think it is better to have an na.rm argument for all the functions. In my use case, most data have missing values.

ManosPapadakis95 commented 3 years ago

Unfortunately we cannot do that. If a utility doesn't have na.rm it means that I wasn't able to find a faster version using na.rm. i am not the expert to answer about statistical functions.

ManosPapadakis95 commented 3 years ago

Finally I have found a faster algorithm for na.rm in colmeans and colsums.