Skip to content

Instantly share code, notes, and snippets.

@tony91782
Created June 6, 2011 03:27
Show Gist options
  • Save tony91782/1009690 to your computer and use it in GitHub Desktop.
Save tony91782/1009690 to your computer and use it in GitHub Desktop.
latlong = aggregate(mydat[,3:4], list(BusID=mydat$BusID),
FUN=mean, na.rm=TRUE)
mycleandat = merge(mydat[,-c(3,4)], latlong)
mycleandat[mycleandat$BusID==1,]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment