Hi.

Try compute the correlation for the transposed data frame:

    cor( t(person.data), use="pairwise.complete.obs" )


Assuming that your data frame "person.data" contains NAs to indicate 
where no value is available, I think the following computation yields N:

    (!is.na(person.data)) %*% t(!is.na(person.data))

using the functions "is.na", "!" (negation), "%*%" (matrix 
multiplication) and "t" (matrix transpose). For details see their help 
pages.

Christian

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to