(updated for RStudio 1.4.1717, details may differ in earlier versions)
The RStudio IDE uses the Hunspell engine for spell-checking on Linux and Windows. Hunspell is also used by a wide-variety of other products including Chrome, Firefox, and LibreOffice, and support for many languages and custom dictionaries is available.
RStudio's default installation includes English dictionaries for the US, UK, Canada, and Australia. In addition, dictionaries for 29 other languages can be installed. To add these dictionaries, go to the Spelling pane of the Options dialog, and select Install More Languages... from the language dictionary select box. This will download and install all of the available languages.
If the language you are working with is not available, or you want to use a different variation of dictionary for a supported language then you can also add languages:
- Obtain copies of the
.dicfiles for the language you want to add. The About Hunspell page has links to sources for additional dictionaries.
- Copy the dictionary files to the appropriate folder for your system (shown below), then restart RStudio:
- Linux and macOS:
When adding a custom language it is important to remember to install both the
.dic file for the language. Note that some OpenOffice dictionary files are bundled together in an archive so in that case you'll need to extract the
.dic files from the archive prior to adding them to RStudio.
You can also configure RStudio to use Hunspell custom dictionaries that include additional terms commonly used within your field (for example, the OpenMedSpel dictionary of medical terms).
To use a custom Hunspell dictionary with RStudio, go to the Spelling pane of the Options dialog and add the appropriate custom .dic files:
Note that since Hunspell .dic files are language-specific, you should be sure that the custom dictionaries you add are intended for use with the main spelling dictionary language you have configured.