al-obrien / farrago

GNU General Public License v3.0
3 stars 0 forks source link

Allow count decimals to work with integer input #5

Open al-obrien opened 4 months ago

al-obrien commented 4 months ago

If the input is an integer, then just return 0s

count_decimals <- function(x) {
  if(inherits(x, 'integer')) return(vector(mode = 'numeric', length = length(x)))
}