본문 바로가기

ETC

[#. R] package ‘KoNLP’ is not available for this version of R, R 4 version 이상에서 발생하는 문제 해결

반응형

 

 

 

 

워드클라우드를 만들기 위해 R에서 KoNLP를 사용하려고 하는데

 

package ‘KoNLP’ is not available for this version of R

 

사용할 수 없다고 뜬다

R 4.1.3 버전을 사용해서 발생하는 문제다

 

 

① R 설치(Window 기준)

 

 

⒧ R console

 

https://cran.r-project.org/bin/windows/base/

 

Download R-4.1.3 for Windows. The R-project for statistical computing.

If you want to double-check that the package you have downloaded matches the package distributed by CRAN, you can compare the md5sum of the .exe to the fingerprint on the master server. You will need a version of md5sum for windows: both graphical and comm

cran.r-project.org

 

 

 

⑵ R studio

 

https://www.rstudio.com/products/rstudio/download/#download

 

Download the RStudio IDE

RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, and a variety of robust tools for plotting, viewing history, debugging and managing

www.rstudio.com

 

 

 

 

 

② R Tools 설치

 

https://cran.r-project.org/bin/windows/Rtools/index.html

 

RTools: Toolchains for building R and R packages from source on Windows

RTools: Toolchains for building R and R packages from source on Windows Choose your version of Rtools:

cran.r-project.org

 

 

 

 

 

③ multilinguer, java, 의존성 패키지, github 설치

 

install.packages("multilinguer") 
library(multilinguer) 
install_jdk()

 

 

install.packages(c("hash", "tau", "Sejong", "RSQLite", "devtools", "bit", "rex", "lazyeval", "htmlwidgets", "crosstalk", "promises", "later", "sessioninfo", "xopen", "bit64", "blob", "DBI", "memoise", "plogr", "covr", "DT", "rcmdcheck", "rversions"), type = "binary")

 

 

install.packages("remotes")

 

 

 

④ KoNLP 설치

 

remotes::install_github('haven-jeon/KoNLP', upgrade = "never", INSTALL_opts=c("--no-multiarch"))

 

 

 

 

 

이 과정을 완료했다면 

해결됐는지 확인해 보자

 

library(KoNLP)
extractNoun("데이터 분석을 공부하고 있는 개발자")

// [1] "데이터" "분석"   "공부"   "개발"

 

이렇게 뜬다면 잘 해결된 거다!

 

 

 

 

 

 

반응형