[R] Finding Missing Data Patterns
wviechtb at s.psych.uiuc.edu
Sun Feb 2 06:10:04 CET 2003
I have a large data matrix, which contains missing data. The matrix
looks something like this:
1) X X X X X X NA NA NA
2) NA NA NA NA X X X X X
3) NA NA X X X X NA NA NA
4) X X X X X X X X X
5) X X NA NA X NA NA NA NA
and so on. Notice that the first row starts with complete data but ends
with missing. The second row starts with missing, but the rest is
complete. The third starts and ends with missing, but the middle part is
complete. The fourth is complete. What I want to do is filter out
patterns like in row 5, where the data are interrupted by missing data.
Basically, I need to test each row for a "data, at least one NA, data"
Is there some kind of way of doing this? I am at a loss for an easy way
to accomplishing this. Any suggestions would be most appreciated!
More information about the R-help