Open jansule opened 7 years ago
As far as I understand it, the .Rdata binary file can include all objects of an R session. Do you want to extract the text parts from it or render the file as ascii? I'm not sure what advantage we get from displaying it. Also extracting its components doesn't seem simple outside the R environment. I'd like to suggest we show a note saying "binary file / no preview" or something.
+1 for not displaying it for now. We have no way if covering all the things that might be in there.
What we could do is start an RStudio instance and load it so people can explore it. But that might be too much?
Another alternative: show a list of objects and their tapy inside the file. We could extract those once.
I could create a preview during extraction with little effort but where would we store it? In the database? Or as a new file mydata.Rdata.preview
? Creating a preview on click event will certainly have bad performance because these files can get fairly large.
Having an R instance to show the contents is too much imho, but if we want that it fits best to the new examine subcontext.
It is preview only, so such extra files would imho go into .erc
, unless that is desirable from the perservation perspective?
Conceptually it fits into the extractor. But I'd first of all discuss if this is really important for us!
@jansule can you extend on the importance of this?
Actually, the file's content should be used to inform the user about the underlying datasets. Open Research should provide the ability to inspect the raw data, despite the original scripts etc. Therefore, I doubt that a preview would be of much help.
A preview is all we could do in reasonable time, everything else goes into a full blown data explorer, which imho is out of scope. I recommend @jansule and @MarkusKonk re-discuss the priority of this issue.
A potential way could be an RData-file-explorer with OpenCPU.
Alternatively we can support specific R objects within an Rdata file, e.g. data.frame
by storing them (excerpts if need by) in more easily accessible file formats, e.g. csv
. Then: where to store it (not in ERC, as they should not be shipped), when to create them, how to limit the size.
@MarkusKonk I suggest to support tabular structures (as.data.frame works) at first.
o2r-inspecter is here! :tada:
API docs: http://o2r.info/o2r-web-api/compendium/files/#file-inspection-rdata changes
PR: #155
A test workspace with a bunch of RData files can be found in our shared project storage ../public/workspace-rdata
.
For the UI, maybe RStudio's workspace explorer can be some inspiration:
varToJSON
)
.Rdata files will not be displayed correctly, since they are stored as binaries and not as text files (R is needed to read their content). It should be considered to convert .Rdata into a text file format, server side. Otherwise it will not be able to display them.