datanormX: normalize data coords with same ratio (for non square field)

Description Usage Arguments Details Value Examples

Description

normalize data coords with same ratio (for non square field)

Usage

1

Arguments

data

frame with x and y components

bd

list with x and y components

Details

normalize x between 0 and 1, y and boundary with same ratio

Value

a list with components

dataN

normalized data

boundaryN

normalized boundary

ratio

normalizing ratio

xmin

minimum value of x within boundary

xmax

maximum value of x within boundary

ymin

minimum value of y within boundary

ymax

maximum value of y within boundary

Examples

1
2
3
4
5
6
7
8
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=datanormX(tabData,bd)
apply(res$dataN,2,range)# x range is now [0,1], not y range
res$ratio # normalization ratio

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