Sample not working in sparkR session

I installed Spark-1.4.0 from source on my computer, Fedora 21 is running, kernel 4.0.5-200.fc21.x86_64, and I ran install-dev.sh in the spark-1.4.0 / R directory. Now when I run "sparkR" on my terminal everything starts up fine, I get to the command prompt and do the following:

> sample(seq(1,10),size=4)
Error in sample(seq(1, 10), size = 4) : unused argument (size = 4)

      

My question is why is "sample" throwing this error in the SparkR console. This works in a regular R session, i.e.

> sample(seq(1,10),size=4)
[1]  1 10  4  2

      

+3


source to share


1 answer


thanks @daattali it was really disguised. In sparkR session I get:



> sample
nonstandardGenericFunction for "sample" defined from package "SparkR"

function (x, withReplacement, fraction, seed) 
{
    standardGeneric("sample")
}
<environment: 0x2e4c810>
Methods may be defined for arguments: x, withReplacement, fraction, seed
Use  showMethods("sample")  for currently available ones.
> 

      

+1


source







All Articles