Reading the transaction file back in

Use the read.transaction file to read the delimited file back into memory formatted as a transaction file. This will have the same results as coercing the dataframe to a transaction file, which we did earlier.

The difference is that the transactions are formatted one transaction per line, as specified by the format='single' option. We also specify where the TransactionID and item descriptions are via the cols option. It is possible to have multiple descriptors and transaction IDs, and identify them with the cols options. The sep keyword designates the delimiter, which in this case is the ! character. There is also a remove duplicate transactions option, which is a logical value that determines whether ...

Get Practical Predictive Analytics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.