IMl <- LETTERS[1:26] count <- 0 vowel <- c("A","E","I","O","U") for ( j in l) { if (j %in% vowel){ count <- 0 while(count < 2){ print(j) count <- count + 1 } } else{ print(j) } }Reply·Article·Sep 13, 2022·Loops in R (Chapter 1 Episode 6)