O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required