Displaying 1 result from an estimated 1 matches for "mad1".
Did you mean:
mad
2009 Dec 04
2
Substitute "Object not found" with NA
...more models don't fit, because if one or more data is missing I cannot create the vectors and the matrix, as well.
So, my question is: is it possible to create a vector with a missing object, substituting that object with NA in the vector?
For example:
I want to create this vector
Vec1<-c(MAD1,MAD2,MAD3,MAD4)
but MAD4 is missing and as a consequence R return an error like this:
"object 'MAD4' not found"
Is it possible to say to R that if it does not find an object it must substitute that object with NA in the vector?
Many Thanks, Fabio
Mr. Fabio Veronesi
Ph.D. stude...