[R] Missing Value And cor() function
Thomas Lumley
tlumley at u.washington.edu
Thu Apr 24 17:34:59 CEST 2003
On Thu, 24 Apr 2003 vincent.stoliaroff at socgen.com wrote:
>
>
> Hi r lovers!
>
> I 'd like to apply the cor() function to a matrix which have some
> missing values As a matter of fact and quite logically indeed it doesn't
> work Is there a trick to replace the missing value by the mean of each
> variable or by any other relevant figures ? Or should I apply a special
> derivate of the cor() function, (I don't have any idea if it exists and
> have some trouble to figure out how it could) to skip this trouble?
The cor() function has two options for handling missing values, which are
described on its help page.
-thomas
More information about the R-help
mailing list