-3

I am currently a SAS data analyst. However, I am trying to learn R and Python as alternatives. So, my question is the following.

In SAS, there is a way to save a SAS data set to the unix server. Is there a way in R or Python to save a data frame to the unix server. In SAS, we do this with a libname and then a data set or proc sql. What is the equivalent in R or Python?

My concern is that once I use R or Python, I have a data frame from a Teradata or Oracle SQL query that I want to save the data frame on a unix server so it will not be deleted.

7
  • 1
    What is the question about? Do you ask about GUI, libraries to write code to store data? Storage format? What is all about? Please, keep in mind that this post should be understandable not only by SAS aware people. Commented Jan 4, 2019 at 16:51
  • 1
    If you Google the phrase "Python save data frame", you’ll find resources that can explain it much better than we can in an answer here. Commented Jan 4, 2019 at 16:52
  • I need to save the data frame to the unix server /gdts_nonmsh01/department/users/myid/. I don't know how to do this in Python or R. I do know how to do this in SAS. In SAS, it is done with: libname OUT '/gdts_nonmsh01/department/users/myid/'; Commented Jan 4, 2019 at 16:56
  • Please see above, I added some detail. Please let me know if you have anymore questions. Commented Jan 4, 2019 at 16:59
  • stackoverflow.com/questions/38884164/… Commented Jan 7, 2019 at 14:57

1 Answer 1

0

In R you can write to disk in many different ways...

writeRDS or from the readr package write_rds save the R files. Additionally, you can save to any other kind of format you want (feather, csv, etc)

Additionally you can write directly to a table in a database if that is your jam. See https://db.rstudio.com/dbi/

Is this what you are looking for?

Sign up to request clarification or add additional context in comments.

Comments