r - "arules" library's "read.transaction()" reads in CSV files with an additional, blank column for every transaction -
when attempt read csv files aren't default groceries.csv, every transaction has additional entry in — blank space — mess of calculations analysis (and crash r if csv file big enough). i've tried insert na's of blank cells in csv file, cannot find way remove of them within read.transactions() command (remove duplicates leaves single na). haven't found trustworthy way fix in of other questions on stackoverflow, nor anywhere else on internet.
example entry:
> inspect(trans[1:5]) items 1 {, facebook.com, google, google web search}
it hard say. assume read data read.transactions()
. csv file have leading white spaces in some/all lines? try use cols
parameter in read.transactions()
fix problem.
an example data , code replicate problem help.
Comments
Post a Comment