Re: [R] Handling NA's when you write your own code

2015-09-09 Thread Ott Toomet
Not quite sure what you mean with "dealing with NAs in use-specific code". Some functions handle these automatically, like lm(). If you write your own code, and want to handle NA-s somehow, you have to implement such checks yourself. You may also use the "complete.cases" function (but that does

[R] Handling NA's when you write your own code

2015-09-09 Thread Olu Ola via R-help
Hello, I have a dataset that have a couple of missing values and I DO NOT want to delete the observations with the missing values. I have read about na.action in dealing with missing values but I do not know how it applies to user-specific written code. Is there a code you can use with your dat