You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yu Ishikawa (JIRA)" <ji...@apache.org> on 2015/08/19 06:19:46 UTC

[jira] [Created] (SPARK-10106) Add `ifelse` Column function to SparkR

Yu Ishikawa created SPARK-10106:
-----------------------------------

             Summary: Add `ifelse` Column function to SparkR
                 Key: SPARK-10106
                 URL: https://issues.apache.org/jira/browse/SPARK-10106
             Project: Spark
          Issue Type: New Feature
          Components: SparkR
            Reporter: Yu Ishikawa


Add a column function on a DataFrame like `ifelse` in R to SparkR.
I guess we could implement it with a combination with {{when}} and {{otherwise}}.

h3. Example

If {{df$x > 0}} is TRUE, then return 0, else return 1.
{noformat}
ifelse(df$x > 0, 0, 1)
{noformat}



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

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