sites.S(1)	       Grass User's Manual	       sites.S(1)



NNAAMMEE
       ssiitteess..SS	 -  Description of the GRASS _s_._m_e_n_u "S" interface
       option.

DDEESSCCRRIIPPTTIIOONN
       This describes the GRASS _s_._m_e_n_u	"S"  statistical  package
       interface option.  See also the manual entry for _s_._m_e_n_u.

SSPPEECCIIAALL AADDJJUUSSTTMMEENNTT
       Due  to the fact that "S" references all subscripts begin-
       ning with 1, and the GIS data begins with 0, it was neces-
       sary  to  add 1 to the category numbers.  Therefore, cate-
       gory value 0 ("no data") becomes category value	1,  cate-
       gory 1 becomes category 2, etc.

SS DDAATTAA SSTTRRUUCCTTUURREESS
       Below  are  descriptions of the data structures created by
       the interface.  As a general comment, within  "S",  simply
       typing  the  data  structure  name will display the values
       contained in the structure.  You may also find  it  inter-
       esting  to display the data structures using the "S" func-
       tion _d_p_u_t_(_).

       ccaatt..hhiissttoo,, ((ccaatt..##..hhiissttoo))

       This structure contains the histogram for the
	      categories in each map layer.  The  histogram  con-
	      tains  the  number  of cells of each category which
	      occur in the user's geographic region (see  wind.n,
	      et  al.,	below).   It  is  a 2-dimensional integer
	      array (matrix).  The first subscript references the
	      map  layer.   The  second  subscript references the
	      category value.

       Examples:
	      cat.histo[2,5] is the cell count for layer 2, cate-
	      gory  5.	 cat.histo[2,]	is the full histogram for
	      layer 2.

       Note:  since more than one layer may occur  in  the  data,
       and  the number of categories in each layer varies, it was
       necessary to create this structure with sufficient  dimen-
       sion  to  hold  the largest category value for all layers.
       Histogram data for categories which do not occur  are  set
       to  NA  ("S"  notation  for "no data").	However, there is
       also an individual histogram  structure	for  each  layer:
       cat.1.histo,  cat.2.histo, etc.	These are simple vectors.

       ccaatt..nnaammee
	      This structure contains the  names  for  the  cate-
	      gories  in  each	map layer.  It is a 2-dimensional
	      character array (matrix).  The first subscript ref-
	      erences the map layer.  The second subscript refer-
	      ences the category.

       Examples:
	      cat.name[2,5] is the name of category 5  for  layer
	      2.   cat.name[2,]  are all category names for layer
	      2.

       Note:  since more than one layer may occur  in  the  data,
       and  the number of categories in each layer varies, it was
       necessary to create this structure with sufficient  dimen-
       sion  to  hold  the largest category value for all layers.
       Names for categories which do not occur	are  set  to  ''.
       However,  there is also an individual category name struc-
       ture for each layer:  cat.1.name, cat.2.name, etc.   These
       are simple vectors.

       ssiittee..ddaattaa
	      This structure contains the data for each site.  It
	      is a 3-dimensional integer array.  The  first  sub-
	      script  references the categories which occurred at
	      the site.   The  second  subscript  references  the
	      site.  The third subscript references the layer.

       Examples:
	      site.data[,5,3]  is the data for site 5 in layer 3.
	      site.data[,2,]  is the data for site 2 in all  lay-
	      ers.  site.data[,,1]  is all site data for layer 1.

       Note: the size of the first dimension will be  the  number
       of  cells in a site, the size of the second dimension will
       be the number of sites, the size of  the  third	dimension
       will be the number of layers.

       ssiittee..mmooddee
	      Since "S" does not provide a statistical mode func-
	      tion, this structure contains the  most  frequently
	      occurring category for each site in each layer.  It
	      is a 2-dimensional  integer  array  (matrix).   The
	      first  subscript	references  the site.  The second
	      subscript references the layer.

       Examples:
	      site.mode[5,3] is the mode for site 5 in	layer  3.
	      site.mode[2,]  are the modes for site 2 in all lay-
	      ers.  site.mode[,1]  are all site modes  for  layer
	      1.

       Note:   this  'mode'  is  not the strict definition of the
       mode.  Since category 0 (which in "S" is category 1)  rep-
       resents	"no  data"  in the GIS databases, it was excluded
       from the mode calculations (essentially as if it had  been
       NA).   For example, if the data for a site are 1 1 1 1 2 2
       3 2 3 1 1, the mode will be 2.

       llaayyeerr..nnaammee
	      This structure contains the raster map layer names.
	      It  is a 2-dimensional array (i.e., a matrix).  The
	      first subscript references the map layer.  The sec-
	      ond subscript selects either the map layer name, or
	      the map layer TITLE.

       Examples:
	      layer.name[3,1]	is   the   name   of   layer   3.
	      layer.name[3]    is  also  the  name  of	layer  3.
	      layer.name[2]	is   the   name   of   layer   2.
	      layer.name[3,2] is the TITLE for layer 3.


       llooccaattiioonn
	      This  is a simple character vector giving the GRASS
	      location from which the data was extracted.

       mmaappsseett This is a simple character vector giving the  GRASS
	      mapset.

       nnllaayyeerrss
	      This  is	a simple integer giving the number of map
	      layers.

       nnssiitteess This is a  simple  integer  giving  the  number  of
	      sites.

       ssiittee..ee This  is	a  simple  integer vector giving the geo-
	      graphic easting for each site.

       ssiittee..nn This is a simple integer	vector	giving	the  geo-
	      graphic northing for each site.

       ssiittee..nnaammee
	      This  is	a  simple  character  vector  giving  the
	      description for each site.

       ssiitteelliisstt
	      This is a simple character vector giving	the  name
	      and  description	of the site lists file from which
	      the sites were taken.

       wwiinndd..nn,, wwiinndd..ss,, wwiinndd..ww,, wwiinndd..ee
	      These are simple real  numbers  giving  the  north,
	      south,  west,  east  of  the  mapset's current geo-
	      graphic region.

       wwiinndd..rreess
	      This is a  simple  real  number  giving  the  GRASS
	      database resolution (in meters).


SS MMAACCRROOSS
       You  may find the following "S" macros helpful when refer-
       encing the 'site.data' and 'site.mode'  structures,  since
       they allow you to specify parameters:

       MACRO site.data(site, layer)
       ({
	    site.data[ , site, layer]
       })
       END


       MACRO site.mode(site, layer)
       ({
	    site.mode[site, layer]
       })
       END


MMAACCRROO UUSSAAGGEE
       To  select  the	site.data  for	all  sites  for  layer 2:
       ??ssiittee..ddaattaa((llaayyeerr==22))

       To  select  the	site.data  for	site  4  in  all  layers:
       ??ssiittee..ddaattaa((ssiittee==44))

       To   select   the  site.mode  for  site	10  in	layer  1:
       ??ssiittee..mmooddee((llaayyeerr==11,,ssiittee==1100))


SSOORRRRYY,, BBUUTT ......
       These macros are not provided by the  interface.   To  use
       these  macros, you will have to type them into a text file
       and then, from "S", issue the command: ddeeffiinnee((""""))


SSEEEE AALLSSOO
       _s_._d_b_._r_i_m

       _s_._i_n_._a_s_c_i_i

       _s_._m_e_n_u

       _s_._o_u_t_._a_s_c_i_i

       _s_._s_u_r_f_._i_d_w

       _s_i_t_e_s_._f_o_r_m_a_t

       _s_i_t_e_s_._o_c_c_u_r

       _s_i_t_e_s_._r_e_p_o_r_t

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_5 _$



GRASS 5.0					       sites.S(1)
