Skip to content
Snippets Groups Projects
  • Dongjoon Hyun's avatar
    6ab4d9e0
    [SPARK-14883][DOCS] Fix wrong R examples and make them up-to-date · 6ab4d9e0
    Dongjoon Hyun authored
    ## What changes were proposed in this pull request?
    
    This issue aims to fix some errors in R examples and make them up-to-date in docs and example modules.
    
    - Remove the wrong usage of `map`. We need to use `lapply` in `sparkR` if needed. However, `lapply` is private so far. The corrected example will be added later.
    - Fix the wrong example in Section `Generic Load/Save Functions` of `docs/sql-programming-guide.md` for consistency
    - Fix datatypes in `sparkr.md`.
    - Update a data result in `sparkr.md`.
    - Replace deprecated functions to remove warnings: jsonFile -> read.json, parquetFile -> read.parquet
    - Use up-to-date R-like functions: loadDF -> read.df, saveDF -> write.df, saveAsParquetFile -> write.parquet
    - Replace `SparkR DataFrame` with `SparkDataFrame` in `dataframe.R` and `data-manipulation.R`.
    - Other minor syntax fixes and a typo.
    
    ## How was this patch tested?
    
    Manual.
    
    Author: Dongjoon Hyun <dongjoon@apache.org>
    
    Closes #12649 from dongjoon-hyun/SPARK-14883.
    6ab4d9e0
    History
    [SPARK-14883][DOCS] Fix wrong R examples and make them up-to-date
    Dongjoon Hyun authored
    ## What changes were proposed in this pull request?
    
    This issue aims to fix some errors in R examples and make them up-to-date in docs and example modules.
    
    - Remove the wrong usage of `map`. We need to use `lapply` in `sparkR` if needed. However, `lapply` is private so far. The corrected example will be added later.
    - Fix the wrong example in Section `Generic Load/Save Functions` of `docs/sql-programming-guide.md` for consistency
    - Fix datatypes in `sparkr.md`.
    - Update a data result in `sparkr.md`.
    - Replace deprecated functions to remove warnings: jsonFile -> read.json, parquetFile -> read.parquet
    - Use up-to-date R-like functions: loadDF -> read.df, saveDF -> write.df, saveAsParquetFile -> write.parquet
    - Replace `SparkR DataFrame` with `SparkDataFrame` in `dataframe.R` and `data-manipulation.R`.
    - Other minor syntax fixes and a typo.
    
    ## How was this patch tested?
    
    Manual.
    
    Author: Dongjoon Hyun <dongjoon@apache.org>
    
    Closes #12649 from dongjoon-hyun/SPARK-14883.