[R] father and son heights

Chuck Cleland ccleland at optonline.net
Sun Feb 15 20:34:23 CET 2004


Marc Schwartz wrote:
> ...
> Found it here:
> 
> http://stat-www.berkeley.edu/users/juliab/141C/pearson.dat
> 
> It consists of 1,078 pairs of father (col 1) and son (col 2) paired
> data.  Used to not only show Pearson correlation, but also used to
> demonstrate Regression to the Mean, or as Galton called it, Regression
> Towards Mediocrity.
> 
> You can save the page as a text file, then read it into R via
> read.table().

Or read it directly from that location with

galton <- 
read.table("http://stat-www.berkeley.edu/users/juliab/141C/pearson.dat", 
sep=" ")[,-1]

names(galton) <- c("fheight", "sheight")

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894




More information about the R-help mailing list