0

I'm working on a thesis project where I need to count the number of x within 5 miles of y.

x are different neighborhood variables (ex: gyms, grocery stores, bars, restaurants, etc) y is a person's address

Is this type of analysis possible in R. The tool I was planning on using is causing more headaches, and I started researching R for this analysis and was wondering if anyone had any experience.

Anshul Goyal
  • 73,278
  • 37
  • 149
  • 186
  • Welcome to SO! Questions like this typically need to have something concrete, including code and often data to support/test the issue. In this case, you should probably include a few rows of a `data.frame` or `matrix` (however you are storing `x`), a few rows of another one (containing `y`), and whatever code you've tried so far. Are you using specific libraries or base functions and need help? (BTW: asking for recommendations on software-libraries is [specifically off-topic for SO](https://stackoverflow.com/help/on-topic), so without additions, this question might be closed.) – r2evans Mar 30 '18 at 02:49
  • Assuming you're dealing with lat/lon coordinates, though, your distance calculation might benefit from `geosphere::distHaversine` and something like https://stackoverflow.com/q/48117286/3358272. – r2evans Mar 30 '18 at 02:50
  • I understand if this gets deleted. I'm not actually a developer, just desperate for some advise or a contact for help. – Kelsey O'Keefe Mar 30 '18 at 18:09

0 Answers0