Support

Spelling Dictionaries

Follow

Spelling Dictionaries

Overview

RStudio 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.

Dictionary Languages

RStudio's default installation includes English dictionaries for the US, UK, Canada, and Australia. In addition, dictionaries for 28 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 by copying the appropriate dictionary files to the languages-user directory. To do this:

  1. Obtain copies of the .aff and .dic files for the language you want to add. Note that the OpenOffice wiki is a good source of additional language dictionaries.
  2. Copy the dictionary files to the dictionaries/languages-user directory. The location of this directory differs per-platform:
    • Linux: ~/.rstudio-desktop/dictionaries/languages-user
    • WinXP: %USERPROFILE%\Local Settings\Application Data\RStudio-Desktop\dictionaries\languages-user
    • Vista and Windows 7/8: %localappdata%\RStudio-Desktop\dictionaries\languages-user

When adding a custom language it is important to remember to install both the .aff and .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 .aff and .dic files from the archive prior to adding them to RStudio.

Custom Dictionaries

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.

Have more questions? Submit a request

Comments