[R-pkg-devel] Spell Check with Hunspell on Windows

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Tue Aug 20 18:02:06 CEST 2024


When running R CMD check I think the test is using

  Sys.which(c("aspell", "hunspell", "ispell"))

to find the spell check program, so the fact that the aspell() command 
worked in R suggests that the PATH that R CMD check saw is different 
than the one that R saw.  Were you running R from the command line when 
aspell() worked?

Duncan Murdoch

On 2024-08-20 11:51 a.m., Kevin R. Coombes wrote:
> Hi,
> 
> This is a follow-up to an earlier question where I asked about R CMD
> check on Windows to be able to check R packages in a manner closer to
> the checks on CRAN machines before i submit (new or updated) packages.
>   From the answers to the previous question, I learned the (magic)
> environment variable to set in order to trigger spell checks.
> 
> So, I then managed to install "hunspell" n my Windows machine. I have
> confirmed that hunspell works
> 
>    * from the command line
>    * inside emacs
>    * inside R when running the "aspell" (or "hunspell") command to check
>      files. (Note that I do not need to set  the "program" argument to
>      aspell in order for this to work.)
> 
> However, when I run R CMD check from the command line, I get the message:
>       ''No suitable spell-checker program found."
> 
> Is there some other environment variable or command line option that I
> have to set in order to get R CMD check to use "hunspell" instead of
> "aspell" or "ispell"?
> 
> Thanks,
>     Kevin
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list