[R] how to get variance?

David Winsemius dwinsemius at comcast.net
Sun Jan 23 17:21:40 CET 2011


On Jan 23, 2011, at 8:25 AM, kiotoqq wrote:

>
> I've got this table:
>
>
>     A   B
> 1  7.8 215
> 2  6.8 280
> 3  9.4 356
> 4  5.2  38
> 5  8.2 167
> 6  4.8 127
> 7  3.7   8
> 8  6.2 201
> 9  9.7 346
> 10 8.1 241
>
> how can I get the variance and covariance of A and B?

?var

(If that hadn't been your first guess, you could always have tried:

??covariance


But maybe not:

RSiteSearch(covariance)   # the term is ubiquitous in statistics  
documents

... and I'm guessing that the number of choices offered would be a lot  
smaller on someone's machine who is just starting out and has few  
extra packages installed than it was on my machine. I think maybe you  
need to do some more self-study of the "Introduction to R" document).
-- 
David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list