All Projects → ropensci → Spelling

ropensci / Spelling

Licence: other
Tools for Spell Checking in R

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Spelling

Gsodr
Global Surface Summary of the Day ('GSOD') Weather Data Client for R
Stars: ✭ 72 (-12.2%)
Mutual labels:  r-package, rstats
Mixomics
Development repository for the Bioconductor package 'mixOmics '
Stars: ✭ 58 (-29.27%)
Mutual labels:  r-package, rstats
Nodbi
Document DBI connector for R
Stars: ✭ 56 (-31.71%)
Mutual labels:  r-package, rstats
Pkgsearch
Search R packages on CRAN
Stars: ✭ 73 (-10.98%)
Mutual labels:  r-package, rstats
Hunspell
The most popular spellchecking library.
Stars: ✭ 1,196 (+1358.54%)
Mutual labels:  spellcheck, spell-check
Tl
tldr for R!
Stars: ✭ 52 (-36.59%)
Mutual labels:  r-package, rstats
Feddata
Functions to Automate Downloading Geospatial Data Available from Several Federated Data Sources
Stars: ✭ 70 (-14.63%)
Mutual labels:  r-package, rstats
Webmockr
R library for stubbing and setting expectations on HTTP requests
Stars: ✭ 37 (-54.88%)
Mutual labels:  r-package, rstats
Wecantspell.hunspell
A port of Hunspell v1 for .NET and .NET Standard
Stars: ✭ 61 (-25.61%)
Mutual labels:  spellcheck, spell-check
Symspellcompound
SymSpellCompound: compound aware automatic spelling correction
Stars: ✭ 61 (-25.61%)
Mutual labels:  spellcheck, spell-check
Notary
🔏📦 Signing & verification of R packages
Stars: ✭ 48 (-41.46%)
Mutual labels:  r-package, rstats
Sysreqs
R package to install system requirements
Stars: ✭ 63 (-23.17%)
Mutual labels:  r-package, rstats
Getlandsat
get landsat 8 images and metadata
Stars: ✭ 47 (-42.68%)
Mutual labels:  r-package, rstats
Vcr
Record HTTP calls and replay them
Stars: ✭ 54 (-34.15%)
Mutual labels:  r-package, rstats
Hexagon
◀️⏹▶️ R package for creating hexagon shaped xy data frames.
Stars: ✭ 40 (-51.22%)
Mutual labels:  r-package, rstats
Lawn
⛔ ARCHIVED ⛔ turf.js R client
Stars: ✭ 57 (-30.49%)
Mutual labels:  r-package, rstats
Cld2
R Wrapper for Google's Compact Language Detector 2
Stars: ✭ 34 (-58.54%)
Mutual labels:  r-package, rstats
Cricketdata
International cricket data for men and women, Tests, ODIs and T20s
Stars: ✭ 35 (-57.32%)
Mutual labels:  r-package, rstats
Lexisnexistools
📰 Working with newspaper data from 'LexisNexis'
Stars: ✭ 59 (-28.05%)
Mutual labels:  r-package, rstats
Pylanguagetool
Python Library and CLI for the LanguageTool JSON API
Stars: ✭ 62 (-24.39%)
Mutual labels:  spellcheck, spell-check

spelling

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Build Status AppVeyor Build Status CRAN_Status_Badge CRAN RStudio mirror downloads

Tools for Spell Checking in R

Spell checking common document formats including latex, markdown, manual pages, and description files. Includes utilities to automate checking of documentation and vignettes as a unit test during 'R CMD check'. Both British and American English are supported out of the box and other languages can be added. In addition, packages may define a 'wordlist' to allow custom terminology without having to abuse punctuation.

Spell Check Single Files

The function spell_check_files automatically parses known text formats and only spell checks text blocks, not code chunks.

spell_check_files('README.md', lang = 'en_US')
#   WORD       FOUND IN
# AppVeyor   README.md:5
# CMD        README.md:12
# RStudio    README.md:8

For more information about the underlying spelling engine and how to add support for other languages, see the hunspell package.

screenshot

Spell Check a Package

Spell check documentation, description, readme, and vignettes of a package:

spell_check_package("~/workspace/V8")
# DESCRIPTION does not contain 'Language' field. Defaulting to 'en-US'.
#   WORD          FOUND IN
# ECMA          V8.Rd:16, description:2,4
# emscripten    description:5
# htmlwidgets   JS.Rd:16
# JSON          V8.Rd:33,38,39,57,58,59,121
# jsonlite      V8.Rd:42
# Ooms          V8.Rd:41,121
# th            description:3
# Xie           JS.Rd:26
# Yihui         JS.Rd:26

Review these words and then whitelist them:

update_wordlist("~/workspace/V8")
# The following words will be added to the wordlist:
#  - ECMA
#  - emscripten
#  - htmlwidgets
#  - JSON
#  - jsonlite
#  - Ooms
#  - th
#  - Xie
#  - Yihui
# Are you sure you want to update the wordlist?
# 1: Yes
# 2: No

Then these will no longer be marked as errors:

> spell_check_package("~/workspace/V8")
No spelling errors found.

Automate Package Spell Checking

Use spell_check_setup() to add a unit test to your package which automatically runs a spell check on documentation and vignettes during R CMD check if the environment variable NOT_CRAN is set to TRUE. By default this unit test never fails; it merely prints potential spelling errors to the console.

spell_check_setup("~/workspace/V8")
# Adding 'Language: en-US' to DESCRIPTION
# No changes required to /Users/jeroen/workspace/V8/inst/WORDLIST
# Updated /Users/jeroen/workspace/V8/tests/spelling.R

Note that the NOT_CRAN variable is automatically set to 1 on Travis and in devtools or RStudio, otherwise you need to set it yourself:

export NOT_CRAN=1
R CMD check V8_1.5.9000.tar.gz
# * using log directory ‘/Users/jeroen/workspace/V8.Rcheck’
# * using R version 3.5.1 (2018-07-02)
# * using platform: x86_64-apple-darwin15.6.0 (64-bit)
# ...
# ...
# * checking tests ...
#   Running ‘spelling.R’
#   Comparing ‘spelling.Rout’ to ‘spelling.Rout.save’ ... OK
#   Running ‘testthat.R’
#  OK
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].