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 2 weeks ago

al-obrien commented 2 weeks 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)))
}