Read and write .omv files as R data.frames

Discuss the jamovi platform, possible improvements, etc.
Post Reply
Darcy
Posts: 1
Joined: Sun Mar 18, 2018 4:05 pm

Read and write .omv files as R data.frames

Post by Darcy »

Let me first say that I believe this is a great piece of software that allows a user-friendly and accessible interface with most of the statistical tools that most people will need. The fact it is based on R gives it power to do so much more, and the fact that it is free furthers its usefulness. Great job!

One improvement I would like to see is some way to make it even easier to go back and forth between R itself (for me it would be RStudio) and Jamovi. Others in this forum have asked for something like a separate syntax window where you could run R code, and I would love to see something like that, but I think there may be a way in the meantime to provide some of this functionality in a minimal way.

I would like to see a function in the jmv package for R (presumably called "read.omv") that would read a omv file and store the result as a data frame. I know that there is more to a jmv file than the data frame, but being able to import just the data.frame into an R environment would make it easier to work with. To some extent, we can do this now if we just convert to a CSV format, but directly importing the data.frame would allow it to preserve features such as variable types, factor levels, and other attributes that might be added in the future.

Likewise, although I acknowledge it is a bit more problematic, I would like to see a "write.omv" function in R as well. This function would take a data.frame and write it into a omv file for easy opening back into jamovi. As a first step, I suppose it would have to overwrite and erase any analyses that were previously in the file, but perhaps a future version of this function could incorporate any previous analysis in a preexisting omv file that is being overwritten. You would need to have check to make sure the variables in those analyses still exist (because who know what kind of changes can be done to the data.frame in between a read.omv and a write.omv), but there could just be a rule that any analysis that involves a variable that no longer exists would disappear.

I think the functionality of a read.omv function and a write.omv function would be a minimal way for people to be able to easily go back and forth between Jamovi and R, and would allow the best of both worlds.
User avatar
jonathon
Posts: 2617
Joined: Fri Jan 27, 2017 10:04 am

Re: Read and write .omv files as R data.frames

Post by jonathon »

hi darcy,

great suggestion, and it's something we've been thinking about for a while.

hopefully, it's something we can add in the next few months.

with thanks

jonathon
Post Reply