asc2im {adehabitat} | R Documentation

## Conversion of Maps of Class 'asc' and 'im' (Package spatstat)

### Description

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

### Usage

    asc2im(x)
    im2asc(x)

### Arguments

`x` | an object of class `asc` or `im`

### Author(s)

Clément Calenge calenge@biomserv.univ-lyon1.fr

### See Also

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

### Examples

    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")

    }

[Package adehabitat version 1.3 Index]