Lab 9 Starter Code

library(arules)
library(arulesViz)

package ‘arulesViz’ was built under R version 3.5.2Loading required package: grid

Step 1: Load data

# read in the data
load("termDocMatrix.rdata")
# store the data in a new object called "Data"
Data <- termDocMatrix
# check the first 5 rows of the matrix
head(Data,5)
Data[Data>1] <- 1
# sets values greater than 1 to one for simple rule mining