I can’t seem to figure this out. I have 5 sets of points to calculate. Can someone point me in the right direction to try to create this
Welcome to the RStudio Community Forum.
Your question sounds a lot like "home-work"! You should read the posting guide to this forum, and try to post some code that you have written that attempts to solve your problem (but perhaps fails for some reason that you can't work out).
Here are some steps you could follow:
- Create some dummy data in a data.frame that represent your points (hint: 4 columns).
- Do some trigonometry calculations on those numbers to find the distances.
- When that code is working, convert it into a simple user-defined function.
Create a dataframe with your desired points as values.
Then use the functions of R to calculate the distance, below there are instructions.
If you need a practical example, you can watch:
Hope this helps.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.