Highlights
#https://www.datacamp.com/community/tutorials/market-basket-analysis-r#code
#install and load package arules
#install.packages("arules")
library(arules)
#install and load arulesViz
#install.packages("arulesViz")
library(arulesViz)
library(plyr)
library(dplyr)
setwd("c:/users/lkost/Onedrive/CS-650-New/Week 10")
retail_data <-read.csv(choose.files())
glimpse(retail_data)
head(retail_data)
tail(retail_data)
summary(retail_data)
#complete.cases(retail_data) will return a logical vector
# indicating which rows have no missing values. Then use the
# vector to get only rows that are complete using retail[,].
retail <- retail_data[complete.cases(retail_data), ]
summary(retail)
glimpse(retail_data)
#mutate function is from dplyr package.
#It is used to edit or add new columns to dataframe.
#Here Description column is being converted to factor column. as.factor converts column to factor column. %>% is an operator with which you may pipe values to another function or expression
retail %>% mutate(Description = as.factor(Description))
retail %>% mutate(Country = as.factor(Country))
glimpse(retail)
summary(retail)
str(retail)
#Converts character data to date. Store InvoiceDate as date
# in new variable
retail$Date <- as.Date.character(retail$InvoiceDate, format = "%m/%d/%Y")
glimpse(retail$Date)
This IT Assignment has been solved by our IT experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.