Skip to content

Instantly share code, notes, and snippets.

@tony91782
Created June 6, 2011 02:33
Show Gist options
  • Save tony91782/1009662 to your computer and use it in GitHub Desktop.
Save tony91782/1009662 to your computer and use it in GitHub Desktop.
set.seed(209)
N_firms =125
N_periods =25
BusID = 1:N_firms
period = 1:N_periods
long = runif(N_firms, -124, -68.25)
lat = runif(N_firms, 26, 47)
locs = data.frame(BusID, long, lat)
per = rep(period, each=N_firms)
mydat = cbind(per, locs)
mydat[per<6,3:4]=NA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment