You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Shivaram Venkataraman (JIRA)" <ji...@apache.org> on 2015/08/19 21:40:46 UTC
[jira] [Resolved] (SPARK-10106) Add `ifelse` Column function to
SparkR
[ https://issues.apache.org/jira/browse/SPARK-10106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shivaram Venkataraman resolved SPARK-10106.
-------------------------------------------
Resolution: Fixed
Fix Version/s: 1.5.0
Issue resolved by pull request 8303
[https://github.com/apache/spark/pull/8303]
> 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
> Fix For: 1.5.0
>
>
> 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, otherwise 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