I am working on data mining in R programming and I'm using RStudio. My dataset looks like this:
I've used 'yes' 'no' instead of any other disease name in some places just to check if it works for 'yes' or 'no'.
Here you can see that a patient has different diseases/diagnosis. I am trying to use association rule to display me the diseases that a person is suffering along with HTN. I've written the following code:
mytestdata <- read.csv("D:/Senior Thesis/Program/test.csv", header=T,
colClasses = "factor", sep = ",")
library(arules)
myrules <- apriori(mytestdata,
parameter = list(supp = 0.1, conf = 0.1, maxlen=10, minlen=2),
appearance = list(rhs=c("Disease.1=HTN")))
summary(myrules)
inspect(myrules)
But I'm not getting any disease name in the column lhs
; you can see that in the following image:
Please help me so that lhs shows the name of the disease associated with rhs which is Disease.1=HTN.