You have no missing data. Note that the string "" is not missing! You
need to code missings as NA. Have look at ?is.na
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx at inbo.be
www.inbo.be
To call in the statistician after the experiment is done may be no more than
asking him to perform a post-mortem examination: he may be able to say what the
experiment died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data.
~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure
that a reasonable answer can be extracted from a given body of data.
~ John Tukey
-----Oorspronkelijk bericht-----
Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
Namens Bill
Verzonden: vrijdag 25 april 2014 13:06
Aan: r-help at r-project.org
Onderwerp: [R] why does it say all the cases are complete?
Hi, Can someone explain why it says the cases are complete. It seems they are
not.
head(x)
rnum Exam.Title Patient.ID Age Sex Impression2
1 1 Temporal bone 3529243 009Y M
2 2 Temporal bone 3529243 010Y M
3 3 Head 3508570 002M M
4 4 Sacrum 3494713 004D F
5 5 Head 3471128 015M F
6 6 Head 3494480 022M M
Impression3 AgeByYear Exposure Reason Result
1 9 H
2 10 H
3 0 H premature Negative
4 0 P
5 1 H seizure negative
6 1 H head trauma Negative
Repeat Result.1
1 h P
2 r1 P
3 N
4 P
5 N
6 h N> complete.cases(x[1:5,])
[1] TRUE TRUE TRUE TRUE TRUE> class(x)
[1] "data.frame"> str(x)
'data.frame': 978 obs. of 13 variables:
$ rnum : int 1 2 3 4 5 6 7 8 9 10 ...
$ Exam.Title : Factor w/ 75 levels "Abdomen","Abdomen (Post
CE)",..: 74 74
21 68 21 21 21 21 2 3 ...
$ Patient.ID : int 3529243 3529243 3508570 3494713 3471128 3494480
3494480 3553704 3295006 3295006 ...
$ Age : Factor w/ 53 levels "000Y","001D",..: 30 33
4 11 43 51 51
40 33 33 ...
$ Sex : Factor w/ 2 levels "F","M": 2 2 2 1 1 2 2 2
1 1 ...
$ Impression2: Factor w/ 114 levels
"","????","?????",..: 1 1 1 1 1 1 1 1
1 57 ...
$ Impression3: Factor w/ 22 levels
"","??","??????",..: 1 1 1 1 1 1 1 1 1
13 ...
$ AgeByYear : int 9 10 0 0 1 1 1 13 10 10 ...
$ Exposure : Factor w/ 27 levels "A","A 2","A
P",..: 11 11 11 27 11 11
11 11 1 2 ...
$ Reason : Factor w/ 112 levels "","abnormal behavior,
check",..: 1 1
80 1 87 36 36 36 1 1 ...
$ Result : Factor w/ 7 levels "","Inconclusive",..: 1 1
4 1 3 4 4 4 1
1 ...
$ Repeat : Factor w/ 13 levels
"","h","r1","r10",..: 2 3 1 1 1 2 3 1 2
6 ...
$ Result.1 : Factor w/ 2 levels "N","P": 2 2 1 2 1 1 1 1
2 2 ...> mode(x)
[1] "list"
[[alternative HTML version deleted]]
______________________________________________
R-help at 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-contained, reproducible code.
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en
binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer
and may not be regarded as stating an official position of INBO, as long as the
message is not confirmed by a duly signed document.