This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Homebrew build logs for brewsci/bio/treepl on macOS 10.13.6 | |
Build date: 2018-08-07 14:05:22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chunks <- seq(from=0, to=1, length.out=7) # how finely we want to divide each univariate character | |
# 0.0000000 0.1666667 0.3333333 0.5000000 0.6666667 0.8333333 1.0000000 | |
possible_states <- expand.grid(a=chunks, b=chunks, c=chunks) # all possible combinations (not adding up to 1). | |
#Doing just three chars here, you can add more: d=chunks, e=chunks.... | |
sums <- apply(possible_states,1, sum) | |
possible_states <- possible_states[which(abs(sums-1)<0.00001),] # now limiting to those that add up to 1 | |
rownames(possible_states) <- sequence(nrow(possible_states)) - 1 # state 0, 1, 2... |