str_view(), repetition at most n times yields error #807, and small typos in "Iteration chapter" (#808)

* Update and rename strings.Rmd to strings.Rmd 

Proposed fix related to this issue: https://github.com/hadley/r4ds/issues/807

A more comprehensive fix should perhaps discuss why "`{,m}`: at most m" does not work (or warn the reader that it does not)

* Typos in iteration.Rmd

Correcting two small typos

* Add missing word

* Add code example for 1,m

Co-authored-by: Mine Cetinkaya-Rundel <cetinkaya.mine@gmail.com>
This commit is contained in:
vanderlindenma 2021-04-14 11:43:36 -04:00 committed by GitHub
parent a4ac9c8db5
commit 2ee3426457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -395,12 +395,13 @@ You can also specify the number of matches precisely:
- `{n}`: exactly n
- `{n,}`: n or more
- `{,m}`: at most m
- `{1,m}`: at most m
- `{n,m}`: between n and m
```{r}
str_view(x, "C{2}")
str_view(x, "C{2,}")
str_view(x, "C{1,3}")
str_view(x, "C{2,3}")
```