readCan: Data input: canopy file (.can)

Description Usage Arguments Details Value Examples

Description

Reads a canopy file, with a .can extension, and creates a data frame from it.

Usage

1
2
readCan(file, label = NA, col3Name = c("speciesID", "plantID", "leafID",
  "polygonID"), col3Sep = c(12, 7, 4))

Arguments

file

The name of the can file which the data are to be read from.

label

Not yet implemeted.

col3Name

Vector containing the names of the different elements in the third columne of the can file.

col3Sep

Positions to split at in the third column. It is mandatory that length(col3Sep) equals length(col3Name) - 1.

Details

The data are stored in a data frame where each row corresponds to only one constituent polygon of the canopy. Only triangle shapes can currently be imported. The first columns contain "labels" linked to the polygons, i.e. characteristics (other than the shape) and IDs. The last column is a list-column containing all the vertices of the polygons. Each element of this column is a matrix. Each row of this matrix corresponds to the spatial coordinates of a vertex.

Value

An object of class c("data.frame", "Canopy").

Examples

1
plants <- readCan(system.file("extdata", "field1.can", package = "canis"))

chgigot/canis documentation built on May 13, 2019, 3:56 p.m.