data(proportionAreaSearched)
d <- c(-300.23,14.3,16,75)
## RP proportion of area searched
weightFun(x=d,propTable=proportionAreaSearched,type='RP',typeCol='plotType',
distanceCol='distanceFromTurbine',propCol='proportionAreaSearched')
#[1] 0.00000000 0.08896480 0.08308577 0.01709869
## FULL plot proportion of area searched
weightFun(x=d,propTable=proportionAreaSearched,type='FULL',typeCol='plotType',
distanceCol='distanceFromTurbine',propCol='proportionAreaSearched')
# [1] 0 1 1 1
### with a max distance restriction
## RP proportion of area searched
weightFun(x=d,propTable=proportionAreaSearched,type='RP',typeCol='plotType',
distanceCol='distanceFromTurbine',propCol='proportionAreaSearched',maxDistance=40)
# [1] 0.00000000 0.08896480 0.08308577 0.00000000
## FULL plot proportion of area searched
weightFun(x=d,propTable=proportionAreaSearched,type='FULL',typeCol='plotType',
distanceCol='distanceFromTurbine',propCol='proportionAreaSearched',maxDistance=40)
# [1] 0 1 1 0
Run the code above in your browser using DataLab