Re: [R] Issue with asin()

2012-03-19 Thread Letnichev
Yes, with the same input I had two different outputs with Excel and R. When printing a debug report of Excel, it showed no anomalies and I am certain it didn't calculate odd values (such as NaNs). The way I coded was wrong, as Sarah said, I didn't follow completely the algorithm. The solution she s

Re: [R] Issue with asin()

2012-03-19 Thread Letnichev
Hello, you're totally right, I tried first to control the flow with "if (MaxDailyTemp > k & MinDailyTemp < k){statement}" but it was a bit messy. Then ifelse() was supposed to help me out, but it didn't. Thank you for your time, your code works exactly as I want :) P. -- View this message in co

[R] Issue with asin()

2012-03-19 Thread Letnichev
Hello everyone, I am working for a few days already on a basic algorithm, very common in applied agronomy, that aims to determine the degree-days necessary for a given individual to reach a given growth stade. The algorithm (and context) is explained here: http://www.oardc.ohio-state.edu/gdd/glos