# A highly artificial example with not enough subjects to be run;
# however, it demonstrates how to put data in it.
set.seed(13)
x <- data.frame( pid = c(1,1,1,1,1),
id = c(1,2,3,4,5),
idfath = c(4,4,4,0,0),
idmoth = c(5,5,5,0,0),
sex = c(1,2,1,1,2),
AffectionStatus = c(1,0,0,1,0),
c.1.a = runif(5),
c.1.b = runif(5),
c.2.a = runif(5),
c.2.b = runif(5),
c.3.a = runif(5),
c.3.b = runif(5) )
x
myCPed <- as.cped( x ) # Mark it with the class 'ped'
myCPed
Run the code above in your browser using DataLab