eRum: European R Users Meeting May 14-16, 2018 @ Budapest, Hungary
While collecting declarative data, we would like to provide our respondents feedback relevant to their answer immediately after they answer our question.
Additionaly, we should be able to customise the feedback to each respondent.
The real-world example of this approach could be salary surveys, which ask people about their current salary and compare it to the salaries of people similar to them.
IQAF Objects provide high level of abstration for declarative data collection with instant feedback.
Each IQAF Object is based on R6Class and can consist of four sub-components:
Each IQAF Object has build-in methods for rendering its compontents and navigating within IQAF object.
# create IQAF object with some ID
q1 <- IQAF$new(id = "salary")
# define the question
q1$question <- "How much do you earn?"
# create answer object of type radio as component of our IQAF object
q1$answer <- AnswerRadio$new(id = q1$id)
# define possible choices for our answer
q1$answer$choices <- c("Enough.", "More than I need!", "Less than my neighbour!!")
ui <- fluidPage(fluidRow(column(width = 12, uiOutput('q1'))))
server <- function(input, output) {
output$q1 <- renderUI({
q1$render_iqaf() # rendering the whole IQAF object
})
q1$create_observer(input, output) # creating IQAF object observers
}
shinyApp(ui = ui, server = server)
The goal is to deliver a useful tool for quickly developing web data products based on declarative data collection with instant feedback, which work with different types of answers and feedbacks, and are mobile ready.
Develop ODGAR R package for