samedi 29 août 2015

How to set probability for randomly picking character from a string in r

i have a string with repetition of 4 character "atgc"

a <- "attgctagctagtcatgctagctacgtacgcatcgtacgatgcatatgctttttaattt"

how to randomly pick a string a size 5 in which the probability of "gc" in that should be 60%




Aucun commentaire:

Enregistrer un commentaire