Re: SparkR : lapplyPartition transforms the data in vertical format

2014-08-07 Thread Pranay Dave
Hello Zongheng Infact the problem is in lapplyPartition lapply gives output as 1,1 2,2 3,3 ... 10,10 However lapplyPartition gives output as 55, NA 55, NA Why lapply output is horizontal and lapplyPartition is vertical ? Here is my code library(SparkR) sc <- sparkR.init("local") lines <- text

Re: SparkR : lapplyPartition transforms the data in vertical format

2014-08-06 Thread Pranay Dave
Hello Shivram Thanks for your reply. Here is a simple data set input. This data is in file called "/sparkdev/datafiles/covariance.txt" 1,1 2,2 3,3 4,4 5,5 6,6 7,7 8,8 9,9 10,10 Output I would like to see is a total of columns. It can be done with reduce, but I wanted to test lapply. Output I wa

SparkR : lapplyPartition transforms the data in vertical format

2014-08-06 Thread Pranay Dave
Hello As per documentation, lapply works on single records and lapplyPartition works on partition However the format of output does not change When I use lapplypartition, the data is converted to vertical format Here is my code library(SparkR) sc <- sparkR.init("local") lines <- textFile(sc,"/