2013-11-01 91 views

回答

2

隨着位的後處理,rawToBits可以使用:

x <- raw() 
(y <- readBin(writeBin(1:10,x),"raw",n=8)) 
[1] 01 00 00 00 02 00 00 00 
sapply(y,function(x) paste(as.integer(rev(rawToBits(x))),collapse="")) 
[1] "00000001" "00000000" "00000000" "00000000" "00000010" "00000000" "00000000" 
[8] "00000000" 
相關問題