[R] Fwd: Need help in exporting R apriori rules to Excel

Sarah Goslee sarah.goslee at gmail.com
Thu Jan 19 17:19:32 CET 2017


Hi,

You need to reply to the list as well as to me; I can't provide private R help.

I don't know what more help you need: I told you what function to use,
and what google search I used to find the answer.

If you have additional problems you need to be more specific in your
question. This link might help:
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Sarah

On Thu, Jan 19, 2017 at 1:35 AM, Edward Tamil <tamildee at gmail.com> wrote:
> hi
>
> Thanks for your reply.
>
> Im new to R. started learning from Web tutorials.below is the code. please
> help me.....
>
> rm(list=ls())
> setwd("D:/POSable/Mahimm sir/Market Basket Analysis")
> tr <- read.csv("Noodles.csv")
> options(max.print=10000000)
> str(tr)
> tr
> i <- split(tr$item, tr$id)
> head(i)
> library("arules")
> txn <- as(i, "transactions")
> basket_rules <- apriori(txn, parameter = list(sup = 0.001, conf = 0.01,
> target="rules"))
> DT <- data.frame(inspect(sort(basket_rules, by="support")))
> write.table(file = "Noodle_rules.csv",DT,sep = ",", col.names = NA,
>             qmethod = "double")
>
>
>
>
> On Wed, Jan 18, 2017 at 7:44 PM, Sarah Goslee <sarah.goslee at gmail.com>
> wrote:
>>
>> I believe you need to convert them to a data frame before you can use
>> any data frame export functions to save them to disk. See ?as
>>
>> I'm assuming that you are using the arules package; your question is
>> incomplete.
>>
>> I've never used arules myself; I googled "rhelp export apriori rules"
>>
>> Sarah
>>
>> On Wed, Jan 18, 2017 at 3:09 AM, Edward Tamil <tamildee at gmail.com> wrote:
>> > Hi Sir,
>> >
>> >
>> > Need help in exporting R apriori rules to Excel. i tried write.csv
>> > write.table write.csv2
>> >
>> > only exporting less than 500 rules.
>> >
>> > unable to export Large Data.
>> >
>> >
>> > " No Error Msg" File size is "0"
>> >
>> > --
>> >
>> > *Edward *
>> >
>> >
>> >
>> >
>> >
>
>
>



More information about the R-help mailing list