[R-sig-Geo] R Help

Sarah Goslee sarah.goslee at gmail.com
Thu Jan 7 21:31:05 CET 2016


As you will see below, posting in HTML format made your question unreadable.

However, this looks rather like homework, and if so then you should
look for help from the resources associated with your course.

If it isn't homework, you will get much more assistance if you provide
a reproducible example including data and the code you've tried
already.

Sarah

On Thu, Jan 7, 2016 at 3:24 PM, Mistry, Krishan <km314 at student.le.ac.uk> wrote:
> Dear Sir/Madame,
>
> I am currently a Masters student at the University of Leicester in the UK studying MSc Geographical Information Science and am having a bit of difficulty with the programme R. I am a new user of the programme and don't have any previous experience in programming. Having looked at various web sites, I wondered if you are able to help me with some trouble i am having in trying to write some code for a mathematical equation.
> I have attached the question to this email and it can be seen below. The dataset is a list of polygons with each polygon containing another list within it, of x and y coordinates.
>
> I would really appreciate it, if you could help me with this question.
>
> Question
> Create functions to compute the area, centroid and perimeter of a polygon list (as in the format of georgia.polys). The formula for the area of a polygon is
>
> A=0.5*?(x? y???) (x??? y?)      for i until n-1
>
> where A is the polygon area, xi is the ith x-coordinate of the polygon boundary (x[i] in R), yi is the ith ycoordinate of the polygon boundary (y[i] in R) - and n is the number of points used to specify the polygon boundary. The polygon is assumed to be in closed form so that the x1 and y1 take the same value as xn and yn.
>
> Hope to hear from you soon.
>
> Yours sincerely
>
> Krishan Mistry
>



More information about the R-sig-Geo mailing list