Cleaning Data & Association Rules - R
问题 I am trying to tidy the following dataset (in link) in R and then run an association rules below. https://www.kaggle.com/fanatiks/shopping-cart install.packages("dplyr") library(dplyr) df <- read.csv("Groceries (2).csv", header = F, stringsAsFactors = F, na.strings=c(""," ","NA")) install.packages("stringr") library(stringr) temp1<- (str_extract(df$V1, "[a-z]+")) temp2<- (str_extract(df$V1, "[^a-z]+")) df<- cbind(temp1,df) df[2] <- NULL df[35] <- NULL View(df) summary(df) str(df) trans <- as