I would like to collapse a CIGAR vector to a CIGAR string. By CIGAR vector to String I mean the following:
I want a function that converts:
cigar.vector = c("M", "M", "I", "I", "M", "I", "", "M", "D", "D", "M", "I", "D", "M", "I")
to this:
cigar.string = "2M2I1M1I1M2D1M1I1D1M1I"
and viceversa.
Note that there is a "" (empty character), that does not count. thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…