search for: in2bin

Displaying 1 result from an estimated 1 matches for "in2bin".

Did you mean: int2bin
2011 Dec 01
2
How to speed up int2bin conversion?
Dear R-help members, I'm processing a large amount of MODIS data where quality assessment information is stored as an integer value for each pixel. I have to converted this number to an 8 digit binary flag to get access to the stored quality code (e.g. in2bin(165,8) = 1 0 1 0 0 1 0 1). Unfortunately, I did not manage to find a package providing a fast function to do so. I need to run this on millions of pixels and thus wrote the following function. int2bin <- function(x,ndigits){ base <- array(NA, dim=c(length(x), ndigits)) for(q in...