## Using several rows of data:
ta <- c(20,22,24)
tr <- ta
vel <- rep(.15,3)
rh <- rep(50,3)
asCoeff <- 0.5
maxLength <- max(sapply(list(ta, tr, vel, rh,asCoeff), length))
ptsa <- sapply(seq(maxLength), function(x) { calcPtsa(ta[x], tr[x], vel[x],
rh[x], asCoeff=asCoeff) } )
Run the code above in your browser using DataLab