thisisnic commented on a change in pull request #91:
URL: https://github.com/apache/arrow-cookbook/pull/91#discussion_r738378910



##########
File path: r/content/reading_and_writing_data.Rmd
##########
@@ -359,3 +358,123 @@ unlink("my_table.parquet")
 unlink("dist_time.parquet")
 unlink("airquality_partitioned", recursive = TRUE)
 ```
+
+## Write compressed data
+
+You want to save a file, compressed with a specified compression algorithm.
+
+### Solution
+
+```{r, parquet_gzip}
+# Create a temporary directory
+td <- tempfile()
+dir.create(td)
+
+# Write data compressed with the gzip algorithm
+write_parquet(iris, file.path(td, "iris.parquet"), compression = "gzip")

Review comment:
       Good point; I've moved it to the "discussion" section now instead.  I 
think this will suffice, as there is a recipe earlier in this chapter for 
writing Parquet files which uses a simple example similar to the one you have 
in parentheses above.




-- 
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.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

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


Reply via email to