search for: custlatlon

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

2004 Apr 04
1
How to improve this code?
...file outfile <- "c:\\output.txt" outfilecolnames <- c("rank","storeid","custid","distance") write.table(t(outfilecolnames), file = outfile, append=TRUE, sep=",",row.names=FALSE, col.names=FALSE) #Trade Area Size TAsize <- c(100) custlatlon <- customerlist[, 2:3] for(i in 1:length(TAsize)){ for(j in 1:nrow(storelist)){ cat("Store: ", storelist[j]," TA Size = ", TAsize[i], "\n") storelatlon <- storelist[j, 2:3] whichval <- which(rdist.earth(t(as.matrix(storelatlon)), as.matrix(custl...