Reply
Highlighted
New Contributor
Posts: 1
Registered: ‎04-26-2019

How to save an R table from the CDSW onto my laptop

[ Edited ]

I have a R script that first establishes a connection to HUE, grab a table from one of the databases, and then convert the table to an R object. 

 

Now I want to save that R object as a CSV on my computer with this line:

 

readr::write_csv(tbl_name, "C:/Users/UserName/Desktop/tbl_name.R")

 

But here is the error message:

 

Error in open.connection(path, "wb") : cannot open the connection
In addition: Warning message:
In open.connection(path, "wb") :
  cannot open file 'C:/Users/UserName/Desktop/tbl_name.R': No such file or directory