R/binToDec.R

binToDec <-
function (x) {

  dec <- sum(x * 2^(rev(seq_along(x)) - 1))
  return(dec)  

}

Try the genMOSS package in your browser

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

genMOSS documentation built on May 2, 2019, 2:31 p.m.