[R] Creating file from raw connection

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Fri May 29 21:36:07 CEST 2020


On 29/05/2020 3:00 p.m., Sebastien Bihorel via R-help wrote:
> Hi,
> 
> Let's say I can extract the content of an Excel .xlsx file stored in a database and store it as raw content in an R object. What would be the proper way to "create" a .xlsx file and "transfer" the content of this obj into it? I took the example of an Excel file, but my question would extend to any kind of binary file.
> 
> Thank you in advance for your input

It depends on how the .xlsx was put in to the database and then 
extracted into R, but if it's just a copy of a file from disk, 
writeBin() will write it without changes.

Duncan Murdoch



More information about the R-help mailing list