H = hadamard(3)
v = 1:8
Hfhm(v)
data(yeast)
dat = as.character(yeast)
# RY-coding
dat2 = dat
dat2[dat=="a" | dat=="g"] = "r"
dat2[dat=="c" | dat=="t"] = "y"
dat2 = phyDat(dat2, type="USER", levels=c("r","y"), ambiguity=NULL)
fit2 = h2st(dat2)
lento(fit2)
# write.nexus.splits(fit2, file = "test.nxs")
# read this file into Spectronet or Splitstree to show the network
dat4 = phyDat(dat, type="USER", levels=c("a","c", "g", "t"), ambiguity=NULL)
fit4 = h4st(dat4)
par(mfrow=c(3,1))
lento(fit4[[1]], main="Transversion")
lento(fit4[[2]], main="Transition 1")
lento(fit4[[3]], main="Transition 2")
Run the code above in your browser using DataLab