closed item set in data mining with R : I'm new to data mining with R and i want to find frequent itemsets of a data set using arules package .i found this example but it doesn't work for me .

    ID=c("A123","A123","A123","A123","B456","B456","B456")
    item=c("bread", "butter", "milk", "eggs", "meat","milk", "peas")
    library(arules)

    trans <- as(split(df$item, df$ID), "transactions")

the result that i want is :

    #   items                    transactionID
    # 1 {bread,butter,eggs,milk} A123         
    # 2 {meat,milk,peas}         B456 
i'm getting this error :"Error in df$item : object of type 'closure' is not subsettable" 

any idea for solving this error or another way for getting item set ??
