search for: gwas_data_chr10

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

2011 Jun 16
1
Read file line by line
...le and get the highest value in the third column so to say. And because the file is so big I don't want to read it all into the memory so reading in chunks and then traverse it line by line and get the biggest number. What I've experiment with is something like this inFile <- file('gwas_data_chr10.gen') output <- 0 while(length(input <- readLines(inFile, n=1000)) > 0){ for (i in seq_along(input)){ temp<-as.numeric(strsplit(input[i], " +")[[1]][3]) if(output<temp){ output<-temp } } } close(inFile) The problem is that it seems to get stuck on an infi...