[ 
https://issues.apache.org/jira/browse/SPARK-7499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14596206#comment-14596206
 ] 

Shivaram Venkataraman commented on SPARK-7499:
----------------------------------------------

Actually we can construct a reference to a DataFrame column by just calling 
`col(col_name_string)` (its a private function in Column.R). So we don't need 
to rely on the `$` operator and its semantics

And thats for the digging up the use of the lazyeval package -- I'll take a 
look at that later today to see what it is doing. My guess we can do something 
simpler here because we have a smaller matching list (i.e. we can get the list 
of valid columns from the DataFrame etc) but I maybe wrong.

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to