Read.transactions -> 50 or more warnings

Hi all,

I have been struggling and I can't found out what I'm doing wrong.

I have to import a csv file into R Studio because I need to perform a market basket analysis. I have been running the following code:

myData <- read.transactions("C:/Transaction.csv", format = "basket" , sep = ",")

Then I get the following error: There were 50 or more warnings
I used warnings()

1: In readLines(file, encoding = encoding) :
incomplete final line found on 'C:/Transaction.csv'
2: In scan(text = l, what = "character", sep = sep, quote = quote, ... :
EOF within quoted string

Anyone know how to solve this?

Hi,

Welcome to the RStudio community!

The error incomplete final line found usually means that your CSV file is not ending in a blank new line. You can open the file, scroll to the last line, and if it is not empty, just add a new blank line, save the file and that should fix it.

Hope this helps,
PJ

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.