0

I have a csv file I generated in Python. I now need to convert it to an R.Data file for further downstream analyses, but I have no idea how to accomplish this.

Someone else asked this question a few years back but it has no solutions. Would really appreciate some input.

Previously asked question: Converting csv to Rdata

neilfws
  • 32,751
  • 5
  • 50
  • 63
newbzzs
  • 295
  • 2
  • 8
  • 1
    Why do you need to "convert to an R.Data file for further downstream analyses"? You can read a CSV file into R, and RData is a file format used to **save** R objects from within R. – neilfws Aug 25 '22 at 02:10
  • I'm trying out/testing a deconvolution program someone wrote that only takes the RData file as an input, otherwise I'd be working with my files as is in the terminal. Thanks for explaining what RData meant. I'm not familiar with R so this was helpful. – newbzzs Aug 25 '22 at 03:59

1 Answers1

2

This is a classic situation of but why?, but if you must accomplish this then it is as easy as:

data <- read.csv("my_file.csv")
save(data, file = "my.file.RData")
geoff
  • 942
  • 5
  • 13