[R] Creating file from raw connection

Sebastien Bihorel Seb@@t|en@B|hore| @end|ng |rom cogn|gencorp@com
Fri May 29 22:26:13 CEST 2020


Thanks Duncan

From: Duncan Murdoch <murdoch.duncan using gmail.com>
Sent: Friday, May 29, 2020 15:36
To: Sebastien Bihorel <Sebastien.Bihorel using cognigencorp.com>; r-help using r-project.org <r-help using r-project.org>
Subject: Re: [R] Creating file from raw connection 
 
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