The package formbuildr
was designed to readily create forms using the R console or a plain text file. A form is made of a series of questions and post-processing functions combined.
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(formbuildr)
```{R q1} q1 <- fob_int("How old are you?") class(q1)
Various questions with answers of pre-determined types are already implemented. ```R R> q1() ❓ How old are you? Enter your answer (an integer): 10 ✔ validated! [1] 10
In interactive mode, validation are done interactively.
R> q1() ❓ How old are you? Enter your answer (an integer): 10.1 ⚠ Validation failed, try again! Enter your answer (an integer): 10 ✔ validated! [1] 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.