Displaying 5 results from an estimated 5 matches for "loc_mod_taz".
2008 Sep 24
2
Calling object outside function
...it errors that the object cannot be found. Do
i use attach? this didnt seem to work either. I just want to call an
object defined in a function outside of the function. Hope you can help
Cheers,
JR
#Function to create hypothetical numbers for process testing
Testdata=function(TAZ_VAC_ACRES,Loc_Mod_TAZ,Dev_Size,TAZDetermine,Dev_Size){
#Loads TAZ and corresponding vacant acres data
TAZ_VAC_ACRES=
read.csv(file="I:/Research/Samba/urb_transport_modeling/LUSDR/Workspace/BizLandPrice/data/TAZ_VAC_ACRES.csv",header=TRUE);
#Test Location Choice Model selected TAZ
Loc_Mod_TAZ = 120
#Create...
2008 Nov 25
2
creating a new vecotr in a for loop
...reates test Candidates Vector
Candidates=c(100,101,102,103,104,105)
#Creates object equaling the number of candidate TAZs from the main script
Location Choice Model
NumCands1=length(Candidates)
Dev..At=9999999
for(i in 1:NumCands1){
#Renames Location Choice Model generated TAZ's object
Loc_Mod_TAZ=Candidates[i]
#Converts Development size from main script to Development density function
format
Dev_Size=Dev..At
#This is my "y" value in the example i gave above, this is the value that i
need put into a # vector, a vector that should have as
many values as there...
2009 Jan 24
1
Environment change?
...he values and length is different, does that fact
that there are quotes around each value change the way R deals with the
values. I am getting an error when i try and use the object that contains
the first list's values. The error is:
Error in `[.data.frame`(TAZ_VAC_FEET, TAZ_VAC_FEET$TAZ == Loc_Mod_TAZ, :
(list) object cannot be coerced to type 'integer'
Now the object Loc_Mod_TAZ would be equal to one of the first list values in
a loop like:
Candidates[i]=Loc_Mod_TAZ. So again the question is does R treat these two
lists the same. Thanks and sorry i cant supply my code, it would...
2008 Sep 30
1
conditional loop
....csv(file="C:/LUSDR/Workspace/BizLandPrice/data/TAZ_VAC_ACRES.csv",header=TRUE);
#Test Location Choice Model selected TAZ
while(TAZDetermine <= Dev_Size){
#Randomly generates test TAZ from 100 to 844
RndTAZ=sample(100:844,1,replace=T)
#Renames randomly generated TAZ's object
Loc_Mod_TAZ = RndTAZ
#Create test Development
Dev_Size=50
#Determines vacant acres by TAZ
TAZDetermine=TAZ_VAC_ACRES[TAZ_VAC_ACRES$TAZ==Loc_Mod_TAZ,2]
#Displays number of vacant acres in Location Choice Model selected TAZ
TAZDetermine
}
--
View this message in context: http://www.nabble.com/conditional...
2008 Dec 12
1
Creating a vector
...ng TAZ_VAC_FEET
TAZ_VAC_FEET=data.frame(TAZS,TAZDEVS)
#Candidate TAZs from location shoice model
cands=c(101,102,107,108)
#Create Object of length of cands
candslength=length(cands)
#Test Location Choice Model selected TAZ
for(i in i:candslength){
#Renames randomly generated TAZ's object
Loc_Mod_TAZ=cands[i]
#Create test Development in Sq. Ft.
Dev_Size=500000
#Determines vacant square feet by TAZ
TAZDetermine_FEET=TAZ_VAC_FEET[TAZ_VAC_FEET$TAZS==Loc_Mod_TAZ,2]
#Heres my problem...my attempt below is to build a vector of
length-"candslength" of all of the
#"TAZDeterm...