https://github.com/cran/Hmisc
Raw File
Tip revision: bc6982d0edbd3b0021200ef0f4e62254491a8af9 authored by Charles Dupont on 10 July 2013, 16:29:37 UTC
version 3.12-2
Tip revision: bc6982d
mask.s
mask<- function(a)
{
  ##determine which bits are on in a vector of status bytes
  if(a>=.Machine$integer.max)
    stop("Value > integer.max")
  
  a <- as.integer(a) 
  as.logical((rep(a, 8)%/%rep(2^(0:7), rep(length(a),8)))%%2)
}

##  Rick Becker
##  Improved by Peter Melewski 14Apr02

back to top