Subscribe to this thread
Home - General / All posts - reading .RData files
artlembo


3,126 post(s)
#28-Nov-17 18:24

I just got some genetic data from a colleague. He has his data in 'R', and the format is .RData. Is there any way to load .RData into MF? I know Mike (mdsumner) has done a lot with R, so perhaps he has some thoughts.

mdsumner


4,219 post(s)
#29-Nov-17 02:42

This is just a binary dump of an R workspace, so it could contain anything (arrays, functions, classed-objects, pointers ...) - you don't want a reader for that. (An equivalent would be to ask for a .mat (Matlab workspace dump) reader and I don't think that's compelling.)

I'd load it in R and explore the objects and use standard write functions to export (contact me off list if you want) probably you want the raster/sf packages for raster/vector data write facilities.

In GDAL-speak this is an R Object Data Store, and this will read (some) array/matrix forms: http://gdal.org/frmt_r.html - this would probably do what you need without using R.

Not to be confused with the raster package's native binary format, which GDAL also reads: http://gdal.org/frmt_various.html#RRASTER


https://github.com/mdsumner

artlembo


3,126 post(s)
#29-Nov-17 03:40

Thanks, Mike. This data should be a table of data. Do you know how to call frmt_r within GDAL?

mdsumner


4,219 post(s)
#29-Nov-17 11:02

I'd be trying to throw the GDAL dataport at it, you never know. Send me a file if you want, "table" could mean many things and technically only a matrix or array will work that way. You otherwise have all of R available to generate a sensible format, and it's trivial, but then we are way off topic for this forum.


https://github.com/mdsumner

artlembo


3,126 post(s)
#29-Nov-17 13:31

thanks, Mike. It is easy enough to use a copy of R to generate an output.

Although, I don't think we are way off topic for the forum. The field of cancer research has tons of data in R, and that is a potentially big player for MF. When I showed a researcher what I was doing with the NYC taxi data in MF, his eyes got real big because the cancer data they work with could be well suited for MF. So, any way to get another data source into MF is probably a good discussion.

hugh
177 post(s)
#30-Nov-17 02:50

particularly given Microsoft's stake in R

Dimitri

6,118 post(s)
#30-Nov-17 09:21

given Microsoft's stake in R

I give big credit to Microsoft for recognizing a good thing and being willing to bet big to think out of the box, but it is not clear how quickly they can turn very big plans into reality with R. Remember that the word "stake" can have two meanings, one of which comes to mind in connection with the key words "undead" and "Nokia."

The more positive meaning we all expect to apply would require Microsoft to not only fully Windows-ize R, but also to make it fully and automatically CPU and GPU parallel, the only way to provide the computation and data speed people want in R. I don't know any case where Microsoft has succeeded in the latter.

As Jeff Benshetler put it...

Why R? R is a well-designed and stable language for statistical computing. [...]

R’s biggest weakness has been poor speed in data manipulation and computation. And it looks like that is where Microsoft is trying to help. R also suffered grotesque difficulty installing some packages on Windows that had to be compiled from source. And I say that as someone who has decades of programming experience on both Linux and Windows.

hugh
177 post(s)
#30-Nov-17 16:10

R is fairly well windowized with Rstudio which works fine with Microsoft's build of R, so I think it would be more along the line of this And yes I am sadly familiar with the other meaning of stake. My first big vector GIS project in 1993 used Atlas GIS which I loved. But I think the R world is way too big to suffer that fate -- even R spatial as evidenced here and often here

Dimitri

6,118 post(s)
#30-Nov-17 17:05

There is a lot of appeal to R Open... it is really tempting to splice Radian and R together. R squared.

mdsumner


4,219 post(s)
#02-Dec-17 00:47

It does lend them great credibility for very little, similar to ESRI and other players along for the ride with RConsortium


https://github.com/mdsumner

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.