haplotype <- matrix(c(0, 0, 0, 0,
1, 1, 1, 1,
0, 0, 1, 1,
1, 1, 0, 0,
1, 1, 1, 1,
0, 0, 0, 0), byrow = TRUE, nrow = 6)
switchPoints <- list(firstInd = c(2), secondInd = c(1, 3), lastInd = 0)
addSwitch(haplotype, switchPoints, 0)
Run the code above in your browser using DataLab