working on a Macbook pro with OS 10.6. I\'ve recently installed the package Aspell with the R package manager and it appears the install went just fine (no install errors). but
As a note, aspell()
works with factors but not character vectors. This won't help til after you have Aspell (or another spell checker) installed, but afterwards if you want to use aspell()
on data in R (instead of just working on files), make sure it's properly formatted.
Here's an example:
> str1 <- "This is a string with a mispeled word"
> str1 <- as.character(str1)
> aspell(str1)
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file 'This is a string with a mispeled word': No such file or directory
> str1 <- "This is a string with a mispelled word"
> str1 <- as.factor(str1)
> results1 <- aspell(str1)
> results1
mispelled
:1:25