Alex, No I have not defined he "dataframe" its the spark default Dataframe. That line is just casting Factor as datarame to send to the function. Thanks -R
On Mon, Mar 14, 2016 at 11:58 PM, Alex Kozlov <ale...@gmail.com> wrote: > This seems to be a very unfortunate name collision. SparkR defines it's > own DataFrame class which shadows what seems to be your own definition. > > Is DataFrame something you define? Can you rename it? > > On Mon, Mar 14, 2016 at 10:44 PM, roni <roni.epi...@gmail.com> wrote: > >> Hi, >> I am working with bioinformatics and trying to convert some scripts to >> sparkR to fit into other spark jobs. >> >> I tries a simple example from a bioinf lib and as soon as I start sparkR >> environment it does not work. >> >> code as follows - >> countData <- matrix(1:100,ncol=4) >> condition <- factor(c("A","A","B","B")) >> dds <- DESeqDataSetFromMatrix(countData, DataFrame(condition), ~ >> condition) >> >> Works if i dont initialize the sparkR environment. >> if I do library(SparkR) and sqlContext <- sparkRSQL.init(sc) it gives >> following error >> >> > dds <- DESeqDataSetFromMatrix(countData, as.data.frame(condition), ~ >> condition) >> Error in DataFrame(colData, row.names = rownames(colData)) : >> cannot coerce class "data.frame" to a DataFrame >> >> I am really stumped. I am not using any spark function , so i would >> expect it to work as a simple R code. >> why it does not work? >> >> Appreciate the help >> -R >> >> > > > -- > Alex Kozlov > (408) 507-4987 > (650) 887-2135 efax > ale...@gmail.com >