0
votes

I am using RStudio for connecting with cassandraDB table data and do association rules model to it. I want to use these table data in association rules model so I want to convert this table into comma separated !

here the code of acquiring table columns and data:

> rddSelect <- select(rdd, customersegment, productcategory, region)
> typeof(rddSelect)
 [1] "list"
> rddSelect
# Source:   lazy query [?? x 3]
# Database: spark_connection
    customersegment productcategory   region
            <chr>           <chr>    <chr>
    1        Consumer       Furniture   Quebec
    2       Corporate Office Supplies   Prarie
    3       Corporate Office Supplies   Prarie
    4       Corporate Office Supplies     West
    5     Home Office Office Supplies     West
    6        Consumer Office Supplies   Quebec
    7     Home Office       Furniture   Prarie
    8  Small Business Office Supplies   Quebec
    9        Consumer      Technology Atlantic
    10     Home Office      Technology   Prarie
      # ... with more rows
    > rddSelectDF <- data.frame(rddSelect)
2
Looks like the first part of your question got deleted. - user2554330
I edited it now to full question !! - Eman

2 Answers

0
votes

Do you mean this?

write.csv2(rddSelectDF,file="./your_folder/rddSelectDF.csv)

Change the name of the folder

0
votes

You mean something like this?

 rddSelectDF <- as.data.frame(rddSelect)
 write.csv(rddSelectDF, file = "rddSelect.csv")