I would like to know whether it is possible to set a limit in terms of available memory (RAM) for a program written in R that creates Parquet file using Arrow package (exporting dataframes to Parquet).
In a database like DuckDB which also allows to create Parquet files, it is possible to set the available memory at database level, for example:
SET memory_limit='10GB';
Can the same be done in R at program level? So that, no matter what, one can be sure that after a certain limit of memory consumption, the program will not go further and allocate more memory from RAM.
Another interesting feature in DuckDB is the possibility to set a temporary directory, so that when the memory limit defined by set memory_limit has reached, the program uses this directory for further required memory allocated on the disk.
Is any of these two features available when using Arrow package in R programs?