[ 
https://issues.apache.org/jira/browse/SPARK-12234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shivaram Venkataraman resolved SPARK-12234.
-------------------------------------------
       Resolution: Fixed
         Assignee: Yanbo Liang
    Fix Version/s: 1.6.0

Resolved by https://github.com/apache/spark/pull/10217

> SparkR subset throw error when only set "select" argument
> ---------------------------------------------------------
>
>                 Key: SPARK-12234
>                 URL: https://issues.apache.org/jira/browse/SPARK-12234
>             Project: Spark
>          Issue Type: Bug
>          Components: SparkR
>            Reporter: Yanbo Liang
>            Assignee: Yanbo Liang
>             Fix For: 1.6.0
>
>
> SparkR subset function throw error when only set "select" argument, it's easy 
> to repreduce.
> In SparkR:
> {code}
> > df <- suppressWarnings(createDataFrame(sqlContext, iris))
> > subset(df, select=c("Sepal_Length", "Petal_Length", "Species"))
> Error in x[subset, select, ...] : 
>   error in evaluating the argument 'i' in selecting a method for function 
> '[': Error: argument "subset" is missing, with no default
> {code}
> But in base R, the subset function works well with only specifying "select" 
> argument:
> {code}
> > df <- iris
> > subset(df, select=c("Sepal.Length", "Petal.Length", "Species"))
>     Sepal.Length Petal.Length    Species
> 1            5.1          1.4     setosa
> 2            4.9          1.4     setosa
> 3            4.7          1.3     setosa
> 4            4.6          1.5     setosa
> 5            5.0          1.4     setosa
> ......
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to