You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ben Sully (JIRA)" <ji...@apache.org> on 2015/06/21 02:13:00 UTC
[jira] [Commented] (SPARK-7499) Investigate how to specify columns
in SparkR without $ or strings
[ https://issues.apache.org/jira/browse/SPARK-7499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14594895#comment-14594895 ]
Ben Sully commented on SPARK-7499:
----------------------------------
I've had a go at this by implementing methods for the generic dplyr verbs, i.e. select/filter/summarise/mutate etc. The other advantage of using these is that commands can be chained using pipes.
There are a few more which need to be implemented (e.g. transmute) but they should be relatively trivial.
Methods are in this gist:
https://gist.github.com/sd2k/6e94e9dc590502473746
> Investigate how to specify columns in SparkR without $ or strings
> -----------------------------------------------------------------
>
> Key: SPARK-7499
> URL: https://issues.apache.org/jira/browse/SPARK-7499
> Project: Spark
> Issue Type: Improvement
> Components: SparkR
> Reporter: Shivaram Venkataraman
>
> Right now in SparkR we need to specify the columns used using `$` or strings. For example to run select we would do
> {code}
> df1 <- select(df, df$age > 10)
> {code}
> It would be good to infer the set of columns in a dataframe automatically and resolve symbols for column names. For example
> {code}
> df1 <- select(df, age > 10)
> {code}
> One way to do this is to build an environment with all the column names to column handles and then use `substitute(arg, env = columnNameEnv)`
--
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