Hi,
I'm not quite sure I understood everything but is this something close?
d <- read.table(textConnection("Dad_ID SpouseYN NKids NSick
1 10 1
2 02 2
3 10 2
4 13 3"), header=TRUE)
mapply(sample, d$NKids+d$
On 11/7/2008 12:00 PM, Stephen Collins wrote:
I am simulating sickness among a group of families. Part of the task is
to randomly draw who in the family will be sick, randomly drawing from
family ID's where Dad =1, Mom = 2, Kid1 = 3, Kid2 = 4., etc. My census of
Dads is of the form shown belo
I am simulating sickness among a group of families. Part of the task is
to randomly draw who in the family will be sick, randomly drawing from
family ID's where Dad =1, Mom = 2, Kid1 = 3, Kid2 = 4., etc. My census of
Dads is of the form shown below.
Dad_ID Spouse (Y=1;N=0)#K
3 matches
Mail list logo