When you convert your polygons to Spatial object, the area will be
accessible through the slots. This can be very tedious to grasp at first
(but try str()). For instance, for a SpatialPolygons of one Polygon

> my.object
An object of class "SpatialPolygons"
Slot "polygons":
[[1]]
An object of class "Polygons"
Slot "Polygons":
[[1]]
An object of class "Polygon"
Slot "labpt":
[1] -38.80103  29.16010

Slot "area":
[1] 14371.66

Slot "hole":
[1] FALSE

Slot "ringDir":
[1] 1

Slot "coords":
           [,1]      [,2]
[1,] -109.76555  61.91851
[2,]   21.09385 105.52317
[3,]   21.09385 -29.65128
[4,] -105.85930 -25.29081
[5,] -109.76555  61.91851



Slot "plotOrder":
[1] 1

Slot "labpt":
[1] -38.80103  29.16010

Slot "ID":
[1] "1"

Slot "area":
[1] 14371.66



Slot "plotOrder":
[1] 1

Slot "bbox":
         min       max
x -109.76555  21.09385
y  -29.65128 105.52317

Slot "proj4string":
CRS arguments: NA

And for this particular case, you can access the area slot through


my.object@polygons[[1]]@Polygons[[1]]@area


Cheers,
Roman




On Mon, Jan 31, 2011 at 12:42 AM, elaine kuo <elaine.kuo.tw@gmail.com>wrote:

> Dear List,
>
> I am dealing with hundreds of shape files. (generated by ArcGIS 9.3)
> They are composed of multiple polygons.
> The polygons are classified as 1, 2, 3, and 4 according to their seasonal
> status.
>
> I want to calculate the total areas of each shape files.
> Furthermore, the areas of 1, 2, 3, and 4 are also needed to be computed for
> each shape file.
>
> Please kindly advise if it is possible to use R packages and functions are
> suitable for the tasks.
> (may be adehabitat)
> Thank you.
>
> Elaine
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
In God we trust, all others bring data.

	[[alternative HTML version deleted]]

