asc2im              package:adehabitat              R Documentation

_C_o_n_v_e_r_s_i_o_n _o_f _M_a_p_s _o_f _C_l_a_s_s '_a_s_c' _a_n_d '_i_m' (_P_a_c_k_a_g_e _s_p_a_t_s_t_a_t)

_D_e_s_c_r_i_p_t_i_o_n:

     These functions convert maps of class 'asc' to objects of class
     'im' (package spatstats) and conversely.

_U_s_a_g_e:

     asc2im(x)
     im2asc(x)

_A_r_g_u_m_e_n_t_s:

       x: an object of class 'asc' or 'im'

_A_u_t_h_o_r(_s):

     Clment Calenge calenge@biomserv.univ-lyon1.fr

_S_e_e _A_l_s_o:

     'import.asc' for additionnal information on objects of class
     'asc', and 'im' for additionnal information on objects of class
     'im'

_E_x_a_m_p_l_e_s:

     if (require(spatstat)) {
       
     #######################
     ### Conversion asc -> im

       data(puechabon)
       el <- getkasc(puechabon$kasc, "Elevation")
       image(el, main = "An object of class \"asc\"")
       elim <- asc2im(el)
       image(elim, main = "An object of class \"im\"")

     #######################
     ### Conversion im -> asc
       u <- matrix(rnorm(10000), 100, 100)
       haha <- im(u)
       image(haha, main = "class im")
       hihi <- im2asc(haha)
       image(hihi, main = "class asc")

     }

