Closed whiteplastic closed 8 years ago
Could you provide some simple reproducible code?
library("mirtCAT")
options(stringsAsFactors = FALSE)
## Potential options for each item
title<-"Personalisierter Fragebogen"
author<-""
instructions<-c("Anleitung:","beantworten Sie die Fragen und klicken Sie dann auf","Weiter")
firstpage<-list(h2("Personalisierter Fragebogen"),"Test","Test")
lastpage <-list(h2("Ende"),"Dies ist das Ende des heutigen Fragebogens")
df <- data.frame(Question = questions, Option = options, Type = "radio_inline")
[redacted]
## Run the mirtCAT web interface and store results
results <- mirtCAT(df = df, ShinyGUI=guiList)
The line
results <- mirtCAT(df = df, ShinyGUI=guiList)
should be
results <- mirtCAT(df = df, shinyGUI=guiList)
Though it appears that providing empty strings is not valid. I'll fix that and then close this issue. Thanks.
Actually, I don't see any bugs here. author
should be authors
and lastpage
should be a function rather than a list (in previous version is was a list, but this was changed in case person estimates should be printed instead).
Yep, I got all the error messages concerning that after changing to shinyGUI
. Supplying an empty string to authors
works.
Great. I'll update the wiki example to reflect that lastpage
should now be a function instead as well. Sorry for the trouble.
I tried to include a firstpage with instructions. I followed "Customize GUI" demo but when I run the code the first page justdoesn´t appear (no problem with lastpage).
css <- readLines('bootstrap.css') title <- "REDiC" authors <- "Aprendemos Todos" firstpage<- list(h2("Bienvenido"), h5("Trata de responder a cada ejercicio.\n Buena suerte!"))
lastpage <- function(person){ list(h1("Gracias por tu respuesta")) }
shinyGUI_list <- list(title = title, authors = authors, demographics = demographics, demographics_inputIDs = c('ID','Fecha','name','edad','gender'), firstpage = firstpage, lastpage = lastpage, css = css)
results <- mirtCAT(df=df, shinyGUI = shinyGUI_list)
Following the "Customize GUI" demo, I tried to define my own ShinyGUI list to override the defaults, but they won't change. Is there anything I'm missing?