aspell_package_Rd_files(dir, drop = c("\\author", "\\references"), control = list(), program = NULL, dictionaries = character())
aspell_package_vignettes(dir, control = list(), program = NULL, dictionaries = character())
aspell_package_R_files(dir, ignore = character(), control = list(), program = NULL, dictionaries = character())
aspell_package_C_files(dir, ignore = character(), control = list(), program = NULL, dictionaries = character())
aspell_write_personal_dictionary_file(x, out, language = "en", program = NULL)
RdTextFilter
.NULL
(default). By default, the system path is searched for
aspell
, hunspell
and ispell
(in that
order), and the first one found is used.aspell
.aspell()
.aspell_package_Rd_files
,
aspell_package_vignettes
, aspell_package_R_files
and
aspell_package_C_files
perform spell checking on the Rd files,
vignettes, R files, and C-level messages of the package with root
directory dir
. They determine the respective files, apply the
appropriate filters, and run the spell checker. See aspell
for details on filters.
The C-level message string are obtained from the
po/PACKAGE.pot message catalog file, with PACKAGE
the basename of dir
. See the section on C-level
messages in Writing R Extensions for more information.
When using Aspell, the vignette checking skips parameters and/or
options of commands \Sexpr
, \citep
, \code
,
\pkg
, \proglang
and \samp
. Further commands can
be skipped by adding --add-tex-command
options to the
control
argument. E.g., to skip both option and parameter of
\mycmd
, add --add-tex-command='mycmd op'
.
Suitable values for control
, program
,
dictionaries
, drop
and ignore
can also be
specified using a package defaults file which should go as
defaults.R into the .aspell subdirectory of dir
,
and provides defaults via assignments of suitable named lists, e.g.,
vignettes <- list(control = "--add-tex-command='mycmd op'")for vignettes (when using Aspell) and similarly assigning to
Rd_files
, R_files
and C_files
for Rd files, R
files and C level message defaults.Maintainers of packages using both English and American spelling will find it convenient to pass control options --master=en_US and --add-extra-dicts=en_GB to Aspell and control options -d en_US,en_GB to Hunspell (provided that the corresponding dictionaries are installed).
Older versions of R had no support for R level dictionaries, and
hence provided the function
aspell_write_personal_dictionary_file
to create (spell check)
program-specific personal dictionary files from words to be accepted.
The new mechanism is to use R level dictionaries, i.e., .rds
files obtained by serializing character vectors of such words using
saveRDS
. For such dictionaries specified via the
package defaults mechanism, elements with no path separator can be R
system dictionaries or dictionaries in the .aspell
subdirectory.
aspell