R Help
Dear Esu, About your question there is huge literature already written. I recommend to read the sp package manual. An example for extract the coordinates you can find it here: https://gis.stackexchange.com/questions/43543/how-to-calculate-polygon-centroids-in-r-for-non-contiguous-shapes If you want to see how works the function remember that r is an open source code and you can find the original functions over the binaries repositories or compressed packages. All the best, Andres On Thu, 20 Dec 2018 at 22:58, Esu Esu via R-sig-Geo <r-sig-geo at r-project.org> wrote:
Dear All,
I am new to R-programming. I have question if anyone can help me with:Q:
how can I create functions in R to compute the area (A), centroid (Cx and
Cy) and perimeter (P) of a polygon list . I want to write R functions to
compute these quantities for individual polygons, as well asan overall
function to take a polygon list and return a data frame with four columns
and the samenumber of rows as polygons in the list. Each quantity
should correspond to each column. it is (sp) class object.
Hope to find any suggestion or answer
RegardsMuhsien
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Andr?s D. [[alternative HTML version deleted]]