How to go about accessing actual data from plots

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)

by civean » Tue Oct 16, 2018 8:04 am

Hello,

I really like the output quality and ease of use of jamovi - finally something I can recommend to students and coworkers less inclined to programming! However, I am trying to figure out some small details that are necessary for using jamovi for actual analysis - I'm sure this can be done in R, but I'm trying to stay "within" jamovi which I think is essential for this audience.

The problem I'm having is actually accessing the exact plotted data in results figures, let's say in the ROC curve for binomial regression. I'm used to python, where I would have new data variables produced as returns from an analysis function, which can be inspected to extract/inspect actual data values. I can't seem to figure this out within jamovi, even when using the Rj environment. Any idea how I would go about it?

Best,
C
civean
 
Posts: 2
Joined: Tue Oct 16, 2018 7:53 am

by jonathon » Tue Oct 16, 2018 9:03 am

oh yup,

so first you need to navigate the results hierarchy, extract the image, and then access the image's state.

you can run this in the Rj editor (or R) with the Tooth Growth data set.

Code: Select all
results <- jmv::logRegBin(
    data = data,
    dep = "supp",
    covs = c("dose", "len"),
    blocks = list(
        list(
            "dose",
            "len")),
    refLevels = list(
        list(
            var="supp",
            ref="OJ")),
    rocPlot = TRUE)

image <- results$models[[1]]$pred$rocPlot

image$state


cheers
User avatar
jonathon
 
Posts: 869
Joined: Fri Jan 27, 2017 10:04 am

by civean » Tue Oct 16, 2018 1:15 pm

Ah, I see! Thank you, works perfect :)

Would it make sense to have "Copy/save image state" (as option to save image) in the right-click menu for images, to make it more discoverable?

Best,
C
civean
 
Posts: 2
Joined: Tue Oct 16, 2018 7:53 am

by jonathon » Tue Oct 16, 2018 9:40 pm

yeah, that's a good suggestion. we definitely need to do something here.

cheers
User avatar
jonathon
 
Posts: 869
Joined: Fri Jan 27, 2017 10:04 am


Return to Help

cron