[R] Linear Model "NA" Value Test

2009-09-21 Thread dmhultst
Hello, I am deriving near real-time liner relationships based on 5-min precipitation data, sometimes the non-qced data result in a slope of NA. I am trying to read the coefficient (in this example x) to see if it is equal to NA, if it is equal to NA assign it a value of 1. I am having trouble w

Re: [R] Linear Model "NA" Value Test

2009-09-21 Thread Ted Harding
On 21-Sep-09 20:38:25, Douglas M. Hultstrand wrote: > Hello, > > I am deriving near real-time liner relationships based on 5-min > precipitation data, sometimes the non-qced data result in a > slope of NA. I am trying to read the coefficient (in this example x) > to see if it is equal to NA, if it

Re: [R] Linear Model "NA" Value Test

2009-09-21 Thread David Winsemius
On Sep 21, 2009, at 4:50 PM, David Winsemius wrote: On Sep 21, 2009, at 4:38 PM, Douglas M. Hultstrand wrote: Hello, I am deriving near real-time liner relationships based on 5-min precipitation data, sometimes the non-qced data result in a slope of NA. I am trying to read the coefficien

Re: [R] Linear Model "NA" Value Test

2009-09-21 Thread David Winsemius
On Sep 21, 2009, at 4:38 PM, Douglas M. Hultstrand wrote: Hello, I am deriving near real-time liner relationships based on 5-min precipitation data, sometimes the non-qced data result in a slope of NA. I am trying to read the coefficient (in this example x) to see if it is equal to NA, if

Re: [R] Linear Model "NA" Value Test

2009-09-21 Thread Erik Iverson
> if("fit$coef[[2]]" == "NA") {.cw = 1} See ?is.na __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-conta

[R] Linear Model "NA" Value Test

2009-09-21 Thread Douglas M. Hultstrand
Hello, I am deriving near real-time liner relationships based on 5-min precipitation data, sometimes the non-qced data result in a slope of NA. I am trying to read the coefficient (in this example x) to see if it is equal to NA, if it is equal to NA assign it a value of 1. I am having trouble w