Learn R Programming

imageData (version 0.1-21)

WUI: Calculates the Water Use Index (WUI)

Description

Calculates the Water Use Index, returning NA if the water use is zero.

Usage

WUI(response, water)

Arguments

response
A numeric giving the value of the response achieved.
water
A numeric giving the amount of water used.

Value

numeric containing the water divided by the response, unless water is zero in which caseNA is returned.

Examples

Run this code
data(exampleData)
Area.WUE <- with(longi.dat, WUI(Area.AGR, Water.Loss))

Run the code above in your browser using DataLab