[1] "atgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgc"
Strings stringr functions (solution)
Exercise
Output solution
Code solutions for stringr Functions
"atgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgcatgc"
.
- ” Thank goodness it’s Friday” without the leading white space
[1] "Thank goodness it's Friday"
"gcagtctgaggattccaccttctacctgggagagaggacatactatatcgcagcagtggaggtggaatgg"
with all of the occurrences of"a"
replaced with"A"
[1] "gcAgtctgAggAttccAccttctAcctgggAgAgAggAcAtActAtAtcgcAgcAgtggAggtggAAtgg"
- Print the length of this dna sequence
[1] 50
- The number of
"a"
s in"gccgatgtacatggaatatacttttcaggaaacacatatctgtggagagg"
.
[1] 16
- Print the first 20 positions of this dna sequence
"gccgatgtacatggaatatacttttcaggaaacacatatctgtggagagg"
[1] "gccgatgtacatggaatata"
- Print the last 10 positions of this dna sequence
gccgatgtacatggaatatacttttcaggaaacacatatctgtggagagg
[1] "tgtggagagg"