I am trying to follow the instructions from this page to perform "rule mining": fpgrowth: FP-Growth in rCBA: CBA Classifier :
#load library
library(rCBA)
library(rJava)
#load data
data("iris")
#format data
train <- sapply(iris,as.factor)
train <- data.frame(train, check.names=FALSE)
txns <- as(train,"transactions")
#run the desired procedure
rules = rCBA::fpgrowth(txns, support=0.03, confidence=0.03, maxLength=2, consequent="Species",
parallel=FALSE)
This returns the following error:
Error: .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
I tried to install/uninstall the necessary packages, but the error is persisting. Does anyone know how to resolve this error?
I have posted the systems log from my R session below:
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=English_Canada.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
Thanks