Displaying 1 result from an estimated 1 matches for "readhh_output".
Did you mean:
read_output
2006 Nov 07
1
reading VERY large binary files
...ooks like this:
readHH <- function(file_name, hhid_list) {
incon=file(file_name, open="rb")
result=data.frame()
tran=list()
byte_mark=0
last_1M_mod=0
file_size=file.info(file_name)$size
write.table(paste("Data pulled from", file_name, sep=" "),
file="readHH_output.txt", sep=",", row.names=FALSE, col.names=FALSE,
append=TRUE)
while (TRUE) {
tran$hh_id <- readBin(incon,integer(),1,size=4)
if(is.element(tran$hh_id, hhid_list)) {
tran$prov_id <- readBin(incon,integer(),1,size=2)
tran$txn_dn <- readBin(incon,in...