R/number2binary.R

Defines functions number2binary

Documented in number2binary

number2binary = function(number, noBits) {
       binary_vector = rev(as.numeric(intToBits(number)))
       if(missing(noBits)) {
          return(binary_vector)
       } else {
          binary_vector[-(1:(length(binary_vector) - noBits))]
       }
    }

Try the IPMRF package in your browser

Any scripts or data that you put into this service are public.

IPMRF documentation built on May 2, 2019, 6:42 a.m.