|
1 | 1 | interfaceExample <- function(jaspResults, dataset, options) { |
2 | 2 | # Just show the options as they are understood the R backend |
| 3 | + jaspResults[["explanation"]] <- createJaspHtml(title = "Outputs as html", |
| 4 | + text = "Here we show the options as they are understood by the R backend.") |
3 | 5 |
|
4 | 6 | # We'll build the output string by appending information to an initially empty container |
5 | 7 | aux <- "" |
6 | 8 |
|
7 | | - output_string <- aux |> |
8 | | - paste(gettextf("The tick mark is set to: %s", as.character(options$my_tick_mark), sep = "")) |> |
9 | | - paste(gettextf("The radio buttons are set to: %s", as.character(options$radio_buttons), sep = ". ")) |> |
10 | | - paste(gettextf("The integer is set to: %s", as.character(options$my_integer), sep = ". ")) |> |
11 | | - paste(gettextf("The double is set to: %s", as.character(options$my_double), sep = ". ")) |> |
12 | | - paste(gettextf("The percentage is set to: %s", as.character(options$my_percent), sep = ". ")) |> |
13 | | - paste(gettextf("The text box is set to: %s", options$my_text, sep = ". ")) |
14 | | - |
15 | | - jaspResults[["result"]] <- createJaspHtml(text = output_string) |
| 9 | + jaspResults[["logicals"]] <- createJaspHtml( |
| 10 | + title = "Logical controls", |
| 11 | + text = aux |> |
| 12 | + paste(gettextf("The tick mark is set to: %s", as.character(options$my_tick_mark))) |> |
| 13 | + paste(gettextf("<br> The radio buttons are set to: %s", as.character(options$radio_buttons))) |
| 14 | + ) |
| 15 | + |
| 16 | + jaspResults[["keyboard"]] <- createJaspHtml( |
| 17 | + title = "Keyboard controls", |
| 18 | + text = aux |> |
| 19 | + paste(gettextf("The integer is set to: %s", as.character(options$my_integer), sep = "")) |> |
| 20 | + paste(gettextf("<br> The double is set to: %s", as.character(options$my_double), sep = ". ")) |> |
| 21 | + paste(gettextf("<br> The percentage is set to: %s", as.character(options$my_percent), sep = ". ")) |> |
| 22 | + paste(gettextf("<br> The text box is set to: <i>%s</i>", options$my_text, sep = ". ")) |
| 23 | + ) |
16 | 24 |
|
17 | 25 | return() |
18 | 26 | } |
|
0 commit comments