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

Description Usage Arguments Author(s) See Also Examples

Description

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

Usage

1
2
asc2im(x)
im2asc(x)

Arguments

x

an object of class asc or im

Author(s)

Clement Calenge clement.calenge@oncfs.gouv.fr

See Also

asc for additionnal information on objects of class asc, and im for additionnal information on objects of class im

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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")

}

Example output

Loading required package: ade4
Loading required package: tkrplot
Loading required package: tcltk
Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

Loading required package: sp

************************************************
************************************************
THE PACKAGE adehabitat IS NOW DEPRECATED!!!!!!!
 It is dangerous to use it, as bugs will no longer be corrected.
It is now recommended to use the packages adehabitatMA, adehabitatLT, adehabitatHR, and adehabitatHS.
These 4 packages are the future of adehabitat.
 They have a vignette explaining in detail how they can be used.
They implement more methods than adehabitat
They are based on the more common and more clever spatial classes implemented in sp.
Bugs are corrected frequently.
Really, avoid to use the classical adehabitat, unless you have a very good reason for it.

*****THIS IS THE VERY LAST WARNING*****
 This is the last version of adehabitat submitted to CRAN (at the time of writing: 2015-03-27).
 THE NEXT VERSION OF adehabitat WILL JUST BE A VIRTUAL PACKAGE LOADING ALL THE PACKAGES DESCRIBED ABOVE.

Warning messages:
1: no DISPLAY variable so Tk is not available 
2: loading Rplot failed 
Loading required package: spatstat
Loading required package: spatstat.data
Loading required package: nlme
Loading required package: rpart

spatstat 1.59-0       (nickname: 'J'ai omis les oeufs de caille') 
For an introduction to spatstat, type 'beginner' 


Note: R version 3.4.4 (2018-03-15) is more than 9 months old; we strongly recommend upgrading to the latest version

Attaching package: 'spatstat'

The following objects are masked from 'package:adehabitat':

    domain, rotxy

The following object is masked from 'package:ade4':

    disc

adehabitat documentation built on Jan. 28, 2018, 5:02 p.m.