This will involve adding a new class `Column` and supporting access of columns in a dataframe using `$` syntax (example: df$A to refer to column A)
Working on this. Starting with base DataFrame methods (filter, groupby, etc.).
Next step is building the Column class and its associated methods.
The first cut of the Column API was merged in https://github.com/amplab-extras/SparkR-pkg/pull/188
Some other APIs which would be good to support include
Column selection:
# Selecting the first column df[[1]] df[["V1"]] df[,1] # Selecting the first two columns df[,1:2] df[,c("V1", "V2")] # Column assignment, mutating the DF df$V3 <- df$V1 + df$V2
I think we can implement this by overriding the `[`, `[[` and assignment operators in the DataFrame S4 class (http://stackoverflow.com/questions/24253048/whats-the-difference-between-setmethod-and-set-setreplacemethod might be useful)
Fixed by https://github.com/amplab-extras/SparkR-pkg/pull/216