datanorm: normalize data coordinates and border

Description Usage Arguments Details Value Examples

Description

normalize data coordinates and border

Usage

1

Arguments

data

data frame with x and y components

bd

boundary (list with x and y components)

Details

normalize boundary between 0 and 1 and data coordinates accordingly

Value

a list with components

dataN

normalized data

boundaryN

normalized boundary

xmin

minimum vaue of x within boundary

xmax

maximum vaue of x within boundary

ymin

minimum vaue of y within boundary

ymax

maximum vaue of y within boundary

Examples

1
2
3
4
5
6
7
x=runif(100, min=0, max=1)
y=runif(100, min=0.2, max=1.7)
range(x) # not [0,1]
tabData=data.frame(x=x,y=y)
bd=list(x=c(0,0,1,1,0), y=c(0.2,1.7,1.7,0.2,0.2))
res=geozoning:::datanorm(tabData,bd)
apply(res$dataN,2,range)#

geozoning documentation built on May 2, 2019, 9:43 a.m.