Displaying 2 results from an estimated 2 matches for "binacres_sum".
2008 Nov 07
1
For Loop - loading 10 sets of data and calculating
I am trying to simplify my code by adding a for loop that will load and
compute a sequence of code 10 time. They way i run it now is that the same
8 lines of code are basically reproduced 10 times. I would like to replace
the numeric value in the code (e.g. Bin1, Bin2....Bin10) each time the loop
goes around. Below i tried doing this with a simple for loop and adding the
string character before
2009 Mar 26
2
loading and manipulating 10 data frames-simplified
...tes Acres data from main data and converts acres to square feet
Bin_Acres=Bin_main[[1]]*43560
#Separates TAZ data from main data
Bin_TAZ=Bin_main[[2]]
#Separates TAZ data from main data and converts acres to square feet
Bin_TAZvacant=Bin_main[[3]]*43560
#Sums each parcel acreage data of the bin
BinAcres_sum=sum(Bin_Acres)
#Creates data frame of cumlative percentages of each parcel of bin
Bin_cumper=cumsum(Bin_Acres/BinAcres_sum)
#Calculates the probability of choosing particular parcel from bin
Bin_parprob=abs(1-Bin_cumper)
#Combines parcel acreage data and cumlative percentage data
BinMain.data =...