gridcell: Grid Cell Identifier

Description Usage Arguments Details Value Author(s) See Also Examples

Description

formatGridcell formats a string as to match a standard. The default format applied in this package is to separate one of the four grid cells (‘Quadrant’) of a grid unit (‘Grundfeld’) with a dash (\dQuote{-}). Function deparseGridcell returns the components plus row and column. See floragrid. dimGridcell returns the dimension of an "Background" object in grid units (rows and column).

Usage

1
2
3
4
5
formatGridcell(x, sep = NULL)

deparseGridcell(x, sep = "-", row.width = 2, col.width = 2)

dimGridcell(x)

Arguments

x

Vector to be coerced to character. For dimGridcell an object of class "Background". For outer an "Extent" object.

sep

Separator.

row.width

Number of characters defining a row.

col.width

Number of characters defining a column.

Details

The most common use case we find in (private) databases is not to signalize the grid cell with any separating character. The forward slash (\dQuote{/}) is often encountered also. Likewise, some data sets apply the dash (\dQuote{-}) as separator. The function deals with all these forms. The default (split = NULL) handles the case where no seperator is used.

Value

A character.

Author(s)

Roland Kaiser

See Also

floragrid

Examples

1
2
3
4
5
6
7
x1 <- c( 80442  ,  78452  ,  79461  )
x2 <- c("8044-2", "7845-2", "7946-1")
x3 <- c("8044/2", "7845/2", "7946/1")

formatGridcell(x1)
formatGridcell(x2, sep = "-")
formatGridcell(x3, sep = "/")

kardinal-eros/sabotag-tools documentation built on May 20, 2019, 7:21 a.m.