Learn R Programming

adehabitat (version 1.8.20)

area2dxf: Exportation of Areas

Description

area2dxf exports a data frame of class area in a DXF file. Such files can be read by virtually all Geographic Information Systems.

Usage

area2dxf(x, file, lay = 1:nlevels(factor(x[, 1])))

Arguments

x

an object of class area

file

a character string giving the name of the DXF file to be created

lay

an optional vector with a length equal to the number of polygons in x. This vector is then stored in the field "Layer" of the DXF file (see examples), for GIS mapping

See Also

area, area.plot

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
  ## Loads the dataset elec88 from the package ade4
  data(elec88)
  ar <- as.area(elec88$area)
  area.plot(ar, values=elec88$tab[,1])
  
  ## exportation of the election results toward a dxf file
  area2dxf(ar, file = "Dept", lay = elec88$tab[,1])
  
  ## Removes the file
  file.remove("Dept.dxf")
# }
# NOT RUN {


# }

Run the code above in your browser using DataLab