import.shape: Import a shapefile

View source: R/import.shape.R

import.shapeR Documentation

Import a shapefile

Description

Imports a shapefile, converting it to an object of class 'metapopulation' or 'landscape'.

Usage

import.shape(filename, path, species.col, ID.col, area.col, dispersal, 
class.landscape=FALSE)

Arguments

filename

Character vector with the shapefile name.

path

Character vector with the path to the file.

species.col

Character vector with the name of the column (in the shapefile) with the species occupancy data.

ID.col

Character vector with the name of the column (in the shapefile) with the patch Id.

area.col

Character vector with the name of the column (in the shapefile) with the patch area, in hectares.

dispersal

Species mean dispersal ability, in meters.

class.landscape

Should the output belong to the class 'metapopulation' or 'landscape'.

Value

Delivers an object of class 'metapopulation' or 'landscape'.

Note

The shapefile must be in project coordinates (units=meters and hectares).

Author(s)

Frederico Mestre and Fernando Canovas

See Also

rland.graph, convert.graph

Examples


## Not run: 

rl1 <- import.shape(filename = "yourshapefile.shp"
			,path = "C:/yourpath..."
			,species.col= "column with species"
			,ID.col="column with patch Id"
			,area.col="Column with area"
			,dispersal=800#Mean dispersal ability of the species 
			#(used to generate patch clusters, or components)
			)


## End(Not run)


MetaLandSim documentation built on Jan. 13, 2023, 1:11 a.m.