trinker/textclean

Could not find function "replace_misspelling"

Closed this issue · 2 comments

The replace_misspelling function seems to be missing in textclean version 0.9.3.

library(textclean)
bad_string <- c("I cant spelll rigtt noow.", '', NA, 'Thiss is aslo mispelled?', 'this is 6$ and 38 cents in back2back!')
replace_misspelling(bad_string)
# Error in replace_misspelling(bad_string) : 
#   could not find function "replace_misspelling"
sessionInfo()
# R version 4.1.1 (2021-08-10)
# Platform: x86_64-pc-linux-gnu (64-bit)
# Running under: Debian GNU/Linux 10 (buster)
# 
# Matrix products: default
# BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.8.0
# LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0
# 
# locale:
#  [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
#  [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
#  [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       
# 
# attached base packages:
# [1] stats     graphics  grDevices utils     datasets  methods   base     
# 
# other attached packages:
# [1] textclean_0.9.3
# 
# loaded via a namespace (and not attached):
# [1] compiler_4.1.1    qdapRegex_0.7.2   tools_4.1.1       glue_1.4.2        data.table_1.14.2

If you look at the NEWS file you can see it was added in 0.9.4. I will push to CRAN soon. In the meantime you can install the development version per the README.

Brilliant, thank you for the quick reply. 👍