Words <- mutate(Words,Position = row_number())
Words <- mutate(Words,Length = str_length(words))
m <- max(Words$Position)
min(Words$Length)
## [1] 1
L3 <- filter(Words,Length == 3)
length(L3)
## [1] 3
L3$words[1]
## [1] "the"
L3 <- mutate(L3,p31 = substr(words,1,1))
L3 <- mutate(L3,p32 = substr(words,2,2))
L3 <- mutate(L3,p33 = substr(words,3,3))
glimpse(L3)
## Observations: 672
## Variables: 6
## $ words <chr> "the", "and", "for", "you", "not", "are", "all", "new", "was…
## $ Position <int> 1, 3, 7, 15, 17, 20, 25, 27, 30, 34, 40, 43, 44, 45, 55, 60,…
## $ Length <int> 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, …
## $ p31 <chr> "t", "a", "f", "y", "n", "a", "a", "n", "w", "c", "h", "b", …
## $ p32 <chr> "h", "n", "o", "o", "o", "r", "l", "e", "a", "a", "a", "u", …
## $ p33 <chr> "e", "d", "r", "u", "t", "e", "l", "w", "s", "n", "s", "t", …