I want to go through a text string using a loop, but when I run the code, it only makes the first iteration.
text <- "CTGGTGCTCGTAGACCGCAGAACC";
i=0
i1=i+3
for (i in 1:length(text)){
DNA <-substr(text,i,i1)
i=i1+1
i1=i+2
print(DNA)
}
What is the error?