s-news
[Top] [All Lists]

na.exclude/na.omit

To: s-news@wubios.wustl.edu
Subject: na.exclude/na.omit
From: P.J.Wells@open.ac.uk
Date: Wed, 27 Jun 2001 16:52:32 +0100
The following is from the Help file on these functions:

"...The na.omit and na.exclude functions return the same data frame.
However, na.exclude adds extra information on which rows were removed as the
na.action attribute of the data frame. ..."

I do

test.exclude <- na.exclude(my.data)
test.omit <- na.omit(my.data)

and then

> names(attributes(test.exclude))
[1] "names"     "na.action" "class"     "row.names"

> names(attributes(test.omit))
[1] "names"      "na.message" "na.action"  "class"      "row.names"

From reading the Help I had expected fewer attributes from na.omit, not
more.

Am I missing something?

Julian Wells

OU Business School
The Open University
Walton Hall
Milton Keynes
MK7 6AA
United Kingdom
+44 1908 654658


<Prev in Thread] Current Thread [Next in Thread>