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)

