powered by
Convert a vector of numeric codes for strain distribution patterns to character strings.
sdp2char(sdp, n_strains = NULL, strains = NULL)
Vector of character strings with the two groups of alleles separated by a vertical bar (|).
Vector of strain distribution patterns (integers between 1 and \(2^n-2\) where \(n\) is the number of strains.
Number of founder strains (if missing but strains is provided, we use the length of strains)
strains
Vector of single-letter codes for the strains
invert_sdp(), calc_sdp()
invert_sdp()
calc_sdp()
sdp <- c(m1=1, m2=12, m3=240) sdp2char(sdp, 8) sdp2char(sdp, strains=c("A", "B", "1", "D", "Z", "C", "P", "W"))
Run the code above in your browser using DataLab