pachamaltese commented on a change in pull request #9748:
URL: https://github.com/apache/arrow/pull/9748#discussion_r596909169



##########
File path: r/R/dataset-write.R
##########
@@ -54,6 +54,40 @@
 #' - `null_fallback`: character to be used in place of missing values (`NA` or
 #' `NULL`) when using Hive-style partitioning. See [hive_partition()].
 #' @return The input `dataset`, invisibly
+#' @examples
+#' # We can partition by one more variables, say, cyl and gear in mtcars 
dataset
+#' one_part_dir <- tempfile()
+#' two_part_dir <- tempfile()
+#' write_dataset(mtcars, one_part_dir, "parquet", partitioning = "cyl")
+#' write_dataset(mtcars, two_part_dir, "parquet", partitioning = c("cyl", 
"gear"))
+#'
+#' # See the contents of the directory we wrote to in order to demonstrate
+#' # what partitioning does
+#' list(
+#'  cyl_partioning = list.files(one_part_dir, pattern = "parquet",
+#'   recursive = TRUE),
+#'  cyl_gear_partitioning = list.files(two_part_dir, pattern = "parquet",
+#'   recursive = TRUE)
+#' )
+#'
+#' # We can do the same combining both arrow and dplyr

Review comment:
       **IMPORTANT**




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to