GitHub user dongjoon-hyun opened a pull request: https://github.com/apache/spark/pull/12649
[SPARK-14883][DOCS] Fix wrong R examples and make them up-to-date ## 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. - Fix the wrong usage of map. We need to use `lapply` if needed. However, the usage of `lapply` also needs to be reviewed since it's private. ``` -teenNames <- map(teenagers, function(p) { paste("Name:", p$name)}) +teenNames <- SparkR:::lapply(teenagers, function(p) { paste("Name:", p$name) }) ``` - 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. You can merge this pull request into a Git repository by running: $ git pull https://github.com/dongjoon-hyun/spark SPARK-14883 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/12649.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #12649 ---- commit 5d6d45e07c15d17c5d1972733962013a6fcd228c Author: Dongjoon Hyun <dongj...@apache.org> Date: 2016-04-24T06:43:45Z [SPARK-14883][DOCS] Fix wrong R examples and make them up-to-date ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org