17.2 Spell-check R Markdown

If you use the RStudio IDE, you can press the F7 key or click the menu Edit -> Check Spelling to spell-check an Rmd document. Real-time spell checking has become available in RStudio v1.3, so you no longer need to manually trigger spell checking with this version or a later version of RStudio.

If you do not use RStudio, the spelling package (Ooms and Hester 2019) has a function spell_check_files(), which can check the spelling of common document formats, including R Markdown. When spell checking Rmd documents, it will skip code chunks and only check ordinary text.

References

Ooms, Jeroen, and Jim Hester. 2019. Spelling: Tools for Spell Checking in R. https://github.com/ropensci/spelling#readme.