rcalinjageman / esci

Estimation Statistics with Confidence Intervals
https://rcalinjageman.github.io/esci/
16 stars 9 forks source link

Make datasets available through the Data Library #30

Closed sjentsch closed 4 months ago

sjentsch commented 10 months ago

If you don't add datasets in 0000.yaml, they won't show up in the Data Library. Initially I wasn't successful in showing the files in the library, and when trying to locate the error I changed the file format from .rda to .omv, and I also removed the beginning data_ from the file name. For the future: I wrote an R-package (jmvReadWrite on CRAN), that includes a function describe_omv that can add a dataset description. Let me know if you want to do that and need help. Latimier isn't in the first edition, so you have to amend the file description in jamovi/0000.yaml.

rcalinjageman commented 9 months ago

Sorry for the delay in looking over this; I was on a short hiatus from the project.

Thanks for looking into this. I hadn't yet added data set to the .yaml file because I've still been debating a bit about which data sets to include and how.

One thing I've been struggling with is that the data formats that work with jamovi don't seem to load properly within the R package and vice versa. jamovi seems to do well with .csv but for some reason this does not load well in the package under R. If I save the same file as both .csv and .rda under data, then it can be loaded both in R and in jamovi (if added to the .yaml file), but this seems wasteful and also strange to have the two representations overtop of each other like that. Do you have any suggestions on how to efficiently enable the same data sets to be available in R and jamovi?

I'd like to keep the data_ prefix, for the sake of keeping this together within the R environment. This seems to work fine in jamovi, at least with the .csv files i had been prepping.

Finally, I've been debating on what data files to include and in what ways (organized by chapter, but design, etc.). In the book, we sometimes use parts of one data file in an early chapter and then expand to use the rest of it in later chapters. Within jamovi, I'd probably want to have the simplified data file and the complete one, to make it very easy for students -- but this would quickly balloon to a pretty large number of files and there doesn't seem to be any way to give any superstructure to data files in jamovi (e.g. chapter 1 files, chapter 2 files, etc.). Within R, I'd be more inclined to include just the complete data files and let anyone using R do their own filtering down to the subsets being worked on... but still debating this.

sjentsch commented 9 months ago

Hei,

regarding your questions and comments.

[1] File format: .rda and .csv should be safe for either application (jamovi and R). The reason why I was choosing .omv was that it is a bit more flexible and more targeted for jamovi (of course, at the expense of being less suited for R). One of the things you can do in .omv is writing a description (like https://github.com/sjentsch/examples4jamovi/blob/main/Analysis%20of%20variance/Alcohol%20Attitudes.omv), and I mentioned describe_omv before that permits you to do that from R. My experience is that very few people would use a jamovi-module as an R-package, thus I was not prioritizing .rda or .csv

[2] data_ – you can easily revert it back if you don't like it.

[3] I guess, the best course of action is to include one file and to mark the chapters where it appears in the book as tags. I can send you an example file if you wish so. I would rather advise against using different files (with the same or similar names) which just might create more confusion than what it saves you by having easier data files.

Cheers,

Sebastian

rcalinjageman commented 4 months ago

I figured out a way forward. I'm including .omv files for the jamovi package -- they show up in jamovi but not R. And I'm using a script using jmvReadWrite to create .rda files for each included .omv and document them with the meta-data in each .omv file. This gives the direct omv files to users in jamovi, and for r users gives rda files all with a data_ prefix to avoid cluttering up the module, and it is keeping these two different formats synced, with everything flowing from the .omv files.

gdcumming commented 4 months ago

To the extent I understand that sounds beautiful! JASP to come I guess, perhaps then one more such clever tweak?

Get Outlook for iOShttps://aka.ms/o0ukef


From: Robert J Calin-Jageman @.> Sent: Saturday, March 9, 2024 6:15:25 AM To: rcalinjageman/esci @.> Cc: Subscribed @.***> Subject: Re: [rcalinjageman/esci] Make datasets available through the Data Library (PR #30)

Closed #30https://github.com/rcalinjageman/esci/pull/30.

— Reply to this email directly, view it on GitHubhttps://github.com/rcalinjageman/esci/pull/30#event-12059657924, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANFVLUAZ47SF6RLTKURKNBDYXIE43AVCNFSM6AAAAAA4BWAUBKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGA2TSNRVG44TENA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

La Trobe University | TEQSA PRV12132 - Australian University | CRICOS Provider 00115M