Learn R Programming

Thermimage (version 2.1)

Prandtl: Returns the Prandtl number

Description

Returns the Prandtl number

Usage

Prandtl(Ta = 20)

Arguments

Ta
Air temperature in degrees Celsius. Default value is 20.

Details

Returns the Prandlt number

References

Blaxter, K. 1989. Energy Metabolism in Animals and Man Gates, D. M. 2003. Biophysical Ecology. Dover Publications, Mineola, New York. 611 pp.

Examples

Run this code
## The function is currently defined as
function (Ta = 20) 
{
    Temp <- c(-50, -25, 0, 20, 40, 60, 80, 90, 100)
    Pr <- c(0.725, 0.72, 0.715, 0.713, 0.711, 0.709, 0.707, 0.7055, 
        0.703)
    lm <- lm(Pr ~ poly(Temp, 6))
    Prandtl <- predict(lm, newdata = data.frame(Temp = Ta), interval = "none")
    names(Prandtl) <- NULL
    Prandtl
  }

# Example:
Ta<-30
Prandtl(Ta)

Run the code above in your browser using DataLab