[R-sig-Geo] R Help
Andres Diaz Loaiza
m@di@zl @ending from gm@il@com
Fri Dec 21 13:33:32 CET 2018
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 using 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 using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Andrés D.
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list