search for: onesurvey

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

2008 Aug 19
0
R-code: for those who like a challenge; HELP
...;-runif(n=1,min=0,max=1) randomtod<-0 for(i in 1:todrange){ if (proprand>data[[9+i]] & proprand<=data[[10+i]]) randomtod=i } ### 11 Thus x<-randomtod-randomrecall ### 12 Generating population weight weight<-round(pop*data[[9+randomtod]])/100000 ### 13 Function returns a vector onesurvey consisting of three values onesurvey<-c(x,y,weight) invisible(onesurvey) } ### 14 Applying f1 to each row of the survey dataset, for the set number of iterations replicate(iterations,{ ### 15 Applying f1 to each row of the survey dataset, one iteration ### this should return a list allsurveys...