Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Possible to run R code in JATOS session?

I'm new to JATOS so I apologize for the novice question. I'm looking to create a survey. I'd like the session to administer the survey to the participant and provide live scoring. The scoring would be performed by R code. I can do this with Shiny (https://shiny.rstudio.com/), but was wondering whether running R code is possible in a JATOS session (without running a separate server).

This is similar to the question here (https://forum.cogsci.nl/discussion/6538/r-script-after-jatos). In that thread, it was noted that a separate R server would need to be set up. I'd rather not set up a separate server. Is it possible to run R code in a JATOS session without a separate R server? If not, are there services that you'd recommend instead of JATOS? Thanks in advance!

Comments

  • Hi,

    R shiny creates an HTML file in the end, so you wouldn't be reading R on the browser, but HTML/JS. So it might be possible. As far as I know, shiny apps expect a "shiny server", so there must be some functions that are posting data to the server that we should be able to replace with jatos.js functions.

    I tried with the example app and I'm not entirely sure where to look. Would you be able to share a minimum example of your R code (or better, Rproj) so that we can look into it?

    Best

    Elisa

  • Hi Elisa,

    Thanks for your response. Here's some example code of a basic Shiny app (from here: https://mastering-shiny.org/basic-app.html):

    library(shiny)
    ui <- fluidPage(
      "Hello, world!"
    )
    server <- function(input, output, session) {
    }
    shinyApp(ui, server)
    

    This would be saved in a file called app.R. I'll be interested to know whether this will work in JATOS--thanks!

  • edited April 2021

    Thanks, but I wanted to see something more complex than the hello world example, or the default shiny app when one creates a project. This will let me see how a proper survey with many questions looks like and I will know better where to include all the functions to communicate with JATOS.

    Could you send me something closer to what you're trying to use? I'll have a look. If you prefer not to share it, I'll try it with the default shiny app

  • edited May 2021

    Hi Elisa,

    Thanks for clarifying. I appreciate the request---however, I haven't created the survey yet. To find something it may eventually be similar to, see here:

    The GitHub code is here:


    Also, in case it's helpful, here's an article that discusses how to use Shiny for creating surveys (and it has a GitHub page linked with examples):

    Thanks,

    Isaac

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games