Least significant bit for a number in R? -
this may have been answered in other languages, having trouble googling answer, because language named r, need piece of code in r accepts number , returns least significant bit.
you can use bitwise operations this:
bitwand(n, 1)
however, beware coercing input vector integer, , works 231−1.
Comments
Post a Comment