read.asciigrid              package:sp              R Documentation

_r_e_a_d/_w_r_i_t_e _t_o/_f_r_o_m (_E_S_R_I) _a_s_c_i_i_g_r_i_d _f_o_r_m_a_t

_D_e_s_c_r_i_p_t_i_o_n:

     read/write to/from ESRI asciigrid format

_U_s_a_g_e:

      
     read.asciigrid(fname, as.image = FALSE, plot.image = FALSE, colname = fname,
      proj4string = CRS(as.character(NA)))
     write.asciigrid(x, fname, attr = 1, na.value = -9999, ...)

_A_r_g_u_m_e_n_t_s:

   fname: file name 

as.image: logical; if FALSE, a list is returned, ready to be shown with
          the 'image' command; if FALSE an object of class
          SpatialGridDataFrame-class is returned 

plot.image: logical; if TRUE, an image of the map is plotted

 colname: alternative name for data column if not file name

proj4string: A CRS object setting the projection arguments of the
          Spatial Grid returned

       x: object of class SpatialGridDataFrame

    attr: attribute column; if missing, the first column is taken; a
          name or a column number may be given

na.value: numeric; value given to missing valued cells in the resulting
          map

     ...: arguments passed to write.table, which is used to write the
          numeric data 

_V_a_l_u_e:

     'read.asciigrid' returns the grid map read; either as an object of
     class SpatialGridDataFrame-class or, if as.image is TRUE, as list
     with components 'x', 'y' and {z}.

_A_u_t_h_o_r(_s):

     Edzer J. Pebesma, e.pebesma@geo.uu.nl

_S_e_e _A_l_s_o:

     as.image.SpatialGridDataFrame, image

_E_x_a_m_p_l_e_s:

     x <- read.asciigrid(system.file("external/test.ag", package="sp")[1])
     class(x)
     image(x)

