Skip to content
Snippets Groups Projects
  • felixcheung's avatar
    2a4e00ca
    [SPARK-9803] [SPARKR] Add subset and transform + tests · 2a4e00ca
    felixcheung authored
    Add subset and transform
    Also reorganize `[` & `[[` to subset instead of select
    
    Note: for transform, transform is very similar to mutate. Spark doesn't seem to replace existing column with the name in mutate (ie. `mutate(df, age = df$age + 2)` - returned DataFrame has 2 columns with the same name 'age'), so therefore not doing that for now in transform.
    Though it is clearly stated it should replace column with matching name (should I open a JIRA for mutate/transform?)
    
    Author: felixcheung <felixcheung_m@hotmail.com>
    
    Closes #8503 from felixcheung/rsubset_transform.
    2a4e00ca
    History
    [SPARK-9803] [SPARKR] Add subset and transform + tests
    felixcheung authored
    Add subset and transform
    Also reorganize `[` & `[[` to subset instead of select
    
    Note: for transform, transform is very similar to mutate. Spark doesn't seem to replace existing column with the name in mutate (ie. `mutate(df, age = df$age + 2)` - returned DataFrame has 2 columns with the same name 'age'), so therefore not doing that for now in transform.
    Though it is clearly stated it should replace column with matching name (should I open a JIRA for mutate/transform?)
    
    Author: felixcheung <felixcheung_m@hotmail.com>
    
    Closes #8503 from felixcheung/rsubset_transform.