├── .Rbuildignore
├── .gitignore
├── DESCRIPTION
├── NAMESPACE
├── Package Helper.R
├── R
├── basic_html.R
├── helpers.R
├── html_stimulus.R
├── run_locally.R
├── stimulus_df_to_json.R
├── utils-pipe.R
└── write_to_script.R
├── README.md
├── _pkgdown.yml
├── docs
├── 404.html
├── articles
│ ├── closerlook.html
│ ├── expo.png
│ ├── index.html
│ ├── jspsychr.html
│ └── recognition.html
├── authors.html
├── docsearch.css
├── docsearch.js
├── index.html
├── link.svg
├── logo.png
├── pkgdown.css
├── pkgdown.js
├── pkgdown.yml
├── reference
│ ├── figures
│ │ ├── expo.png
│ │ └── logo.png
│ ├── html_stimulus.html
│ ├── index.html
│ ├── pipe.html
│ ├── resource.html
│ ├── run_locally.html
│ ├── stimulus_df_to_json.html
│ ├── unquote.html
│ └── write_to_script.html
└── sitemap.xml
├── inst
└── rmarkdown
│ ├── basic_template.html
│ └── templates
│ ├── jspsychr
│ ├── skeleton
│ │ ├── experiment
│ │ │ ├── index.Rmd
│ │ │ ├── index.html
│ │ │ ├── jspsych-6-2
│ │ │ │ ├── css
│ │ │ │ │ └── jspsych.css
│ │ │ │ ├── examples
│ │ │ │ │ ├── add-to-end-of-timeline.html
│ │ │ │ │ ├── conditional-and-loop-functions.html
│ │ │ │ │ ├── css
│ │ │ │ │ │ └── jquery-ui.css
│ │ │ │ │ ├── data-add-properties.html
│ │ │ │ │ ├── data-as-function.html
│ │ │ │ │ ├── data-from-timeline.html
│ │ │ │ │ ├── data-from-url.html
│ │ │ │ │ ├── demo-flanker.html
│ │ │ │ │ ├── demo-simple-rt-task.html
│ │ │ │ │ ├── demos
│ │ │ │ │ │ ├── demo_1.html
│ │ │ │ │ │ ├── demo_2.html
│ │ │ │ │ │ └── demo_3.html
│ │ │ │ │ ├── display-element-to-embed-experiment.html
│ │ │ │ │ ├── end-active-node.html
│ │ │ │ │ ├── end-experiment.html
│ │ │ │ │ ├── exclusions.html
│ │ │ │ │ ├── external_html
│ │ │ │ │ │ └── simple_consent.html
│ │ │ │ │ ├── img
│ │ │ │ │ │ ├── 1.gif
│ │ │ │ │ │ ├── 10.gif
│ │ │ │ │ │ ├── 11.gif
│ │ │ │ │ │ ├── 12.gif
│ │ │ │ │ │ ├── 2.gif
│ │ │ │ │ │ ├── 3.gif
│ │ │ │ │ │ ├── 4.gif
│ │ │ │ │ │ ├── 5.gif
│ │ │ │ │ │ ├── 6.gif
│ │ │ │ │ │ ├── 7.gif
│ │ │ │ │ │ ├── 8.gif
│ │ │ │ │ │ ├── 9.gif
│ │ │ │ │ │ ├── age
│ │ │ │ │ │ │ ├── of1.jpg
│ │ │ │ │ │ │ ├── of2.jpg
│ │ │ │ │ │ │ ├── of3.jpg
│ │ │ │ │ │ │ ├── om1.jpg
│ │ │ │ │ │ │ ├── om2.jpg
│ │ │ │ │ │ │ ├── om3.jpg
│ │ │ │ │ │ │ ├── yf1.jpg
│ │ │ │ │ │ │ ├── yf4.jpg
│ │ │ │ │ │ │ ├── yf5.jpg
│ │ │ │ │ │ │ ├── ym2.jpg
│ │ │ │ │ │ │ ├── ym3.jpg
│ │ │ │ │ │ │ └── ym5.jpg
│ │ │ │ │ │ ├── backwardN.gif
│ │ │ │ │ │ ├── blue.png
│ │ │ │ │ │ ├── con1.png
│ │ │ │ │ │ ├── con2.png
│ │ │ │ │ │ ├── fixation.gif
│ │ │ │ │ │ ├── happy_face_1.jpg
│ │ │ │ │ │ ├── happy_face_2.jpg
│ │ │ │ │ │ ├── happy_face_3.jpg
│ │ │ │ │ │ ├── happy_face_4.jpg
│ │ │ │ │ │ ├── inc1.png
│ │ │ │ │ │ ├── inc2.png
│ │ │ │ │ │ ├── normalN.gif
│ │ │ │ │ │ ├── orange.png
│ │ │ │ │ │ ├── redX.png
│ │ │ │ │ │ ├── ribbon.jpg
│ │ │ │ │ │ ├── sad_face_1.jpg
│ │ │ │ │ │ ├── sad_face_2.jpg
│ │ │ │ │ │ ├── sad_face_3.jpg
│ │ │ │ │ │ └── sad_face_4.jpg
│ │ │ │ │ ├── js
│ │ │ │ │ │ └── snap.svg-min.js
│ │ │ │ │ ├── jspsych-animation.html
│ │ │ │ │ ├── jspsych-audio-button-response.html
│ │ │ │ │ ├── jspsych-audio-keyboard-response.html
│ │ │ │ │ ├── jspsych-audio-slider-response.html
│ │ │ │ │ ├── jspsych-call-function.html
│ │ │ │ │ ├── jspsych-categorize-animation.html
│ │ │ │ │ ├── jspsych-categorize-html.html
│ │ │ │ │ ├── jspsych-categorize-image.html
│ │ │ │ │ ├── jspsych-cloze.html
│ │ │ │ │ ├── jspsych-free-sort.html
│ │ │ │ │ ├── jspsych-fullscreen.html
│ │ │ │ │ ├── jspsych-html-button-response.html
│ │ │ │ │ ├── jspsych-html-keyboard-response.html
│ │ │ │ │ ├── jspsych-html-slider-response.html
│ │ │ │ │ ├── jspsych-iat.html
│ │ │ │ │ ├── jspsych-image-button-response.html
│ │ │ │ │ ├── jspsych-image-keyboard-response.html
│ │ │ │ │ ├── jspsych-image-slider-response.html
│ │ │ │ │ ├── jspsych-instructions.html
│ │ │ │ │ ├── jspsych-rdk.html
│ │ │ │ │ ├── jspsych-reconstruction.html
│ │ │ │ │ ├── jspsych-resize.html
│ │ │ │ │ ├── jspsych-same-different-html.html
│ │ │ │ │ ├── jspsych-same-different-image.html
│ │ │ │ │ ├── jspsych-serial-reaction-time-mouse.html
│ │ │ │ │ ├── jspsych-serial-reaction-time.html
│ │ │ │ │ ├── jspsych-survey-html-form.html
│ │ │ │ │ ├── jspsych-survey-likert.html
│ │ │ │ │ ├── jspsych-survey-multi-choice.html
│ │ │ │ │ ├── jspsych-survey-multi-select.html
│ │ │ │ │ ├── jspsych-survey-text.html
│ │ │ │ │ ├── jspsych-video-button-response.html
│ │ │ │ │ ├── jspsych-video-keyboard-response.html
│ │ │ │ │ ├── jspsych-video-slider-response.html
│ │ │ │ │ ├── jspsych-visual-search-circle.html
│ │ │ │ │ ├── jspsych-vsl-animate-occlusion.html
│ │ │ │ │ ├── jspsych-vsl-grid-scene.html
│ │ │ │ │ ├── lexical-decision.html
│ │ │ │ │ ├── manual-preloading.html
│ │ │ │ │ ├── pause-unpause.html
│ │ │ │ │ ├── progress-bar.html
│ │ │ │ │ ├── sound
│ │ │ │ │ │ ├── hammer.mp3
│ │ │ │ │ │ ├── sound.mp3
│ │ │ │ │ │ ├── speech_blue.mp3
│ │ │ │ │ │ ├── speech_green.mp3
│ │ │ │ │ │ ├── speech_joke.mp3
│ │ │ │ │ │ ├── speech_red.mp3
│ │ │ │ │ │ └── tone.mp3
│ │ │ │ │ ├── timeline-variables-sampling.html
│ │ │ │ │ ├── timeline-variables.html
│ │ │ │ │ └── video
│ │ │ │ │ │ └── sample_video.mp4
│ │ │ │ ├── jspsych.js
│ │ │ │ ├── license.txt
│ │ │ │ └── plugins
│ │ │ │ │ ├── jspsych-animation.js
│ │ │ │ │ ├── jspsych-audio-button-response.js
│ │ │ │ │ ├── jspsych-audio-keyboard-response.js
│ │ │ │ │ ├── jspsych-audio-slider-response.js
│ │ │ │ │ ├── jspsych-call-function.js
│ │ │ │ │ ├── jspsych-categorize-animation.js
│ │ │ │ │ ├── jspsych-categorize-html.js
│ │ │ │ │ ├── jspsych-categorize-image.js
│ │ │ │ │ ├── jspsych-cloze.js
│ │ │ │ │ ├── jspsych-external-html.js
│ │ │ │ │ ├── jspsych-free-sort.js
│ │ │ │ │ ├── jspsych-fullscreen.js
│ │ │ │ │ ├── jspsych-html-button-response.js
│ │ │ │ │ ├── jspsych-html-keyboard-response.js
│ │ │ │ │ ├── jspsych-html-slider-response.js
│ │ │ │ │ ├── jspsych-iat-html.js
│ │ │ │ │ ├── jspsych-iat-image.js
│ │ │ │ │ ├── jspsych-image-button-response.js
│ │ │ │ │ ├── jspsych-image-keyboard-response.js
│ │ │ │ │ ├── jspsych-image-slider-response.js
│ │ │ │ │ ├── jspsych-instructions.js
│ │ │ │ │ ├── jspsych-rdk.js
│ │ │ │ │ ├── jspsych-reconstruction.js
│ │ │ │ │ ├── jspsych-resize.js
│ │ │ │ │ ├── jspsych-same-different-html.js
│ │ │ │ │ ├── jspsych-same-different-image.js
│ │ │ │ │ ├── jspsych-serial-reaction-time-mouse.js
│ │ │ │ │ ├── jspsych-serial-reaction-time.js
│ │ │ │ │ ├── jspsych-survey-html-form.js
│ │ │ │ │ ├── jspsych-survey-likert.js
│ │ │ │ │ ├── jspsych-survey-multi-choice.js
│ │ │ │ │ ├── jspsych-survey-multi-select.js
│ │ │ │ │ ├── jspsych-survey-text.js
│ │ │ │ │ ├── jspsych-video-button-response.js
│ │ │ │ │ ├── jspsych-video-keyboard-response.js
│ │ │ │ │ ├── jspsych-video-slider-response.js
│ │ │ │ │ ├── jspsych-visual-search-circle.js
│ │ │ │ │ ├── jspsych-vsl-animate-occlusion.js
│ │ │ │ │ ├── jspsych-vsl-grid-scene.js
│ │ │ │ │ └── template
│ │ │ │ │ └── jspsych-plugin-template.js
│ │ │ └── jspsychr
│ │ │ │ └── jspsychr.js
│ │ ├── run.R
│ │ └── skeleton.Rmd
│ └── template.yaml
│ └── jspsychr_basic_html
│ ├── skeleton
│ └── skeleton.Rmd
│ └── template.yaml
├── jsPsychR.Rproj
├── man
├── basic_html.Rd
├── figures
│ ├── expo.png
│ └── logo.png
├── html_stimulus.Rd
├── pipe.Rd
├── resource.Rd
├── run_locally.Rd
├── stimulus_df_to_json.Rd
├── unquote.Rd
└── write_to_script.Rd
├── pkgdown
└── favicon
│ ├── apple-touch-icon-120x120.png
│ ├── apple-touch-icon-152x152.png
│ ├── apple-touch-icon-180x180.png
│ ├── apple-touch-icon-60x60.png
│ ├── apple-touch-icon-76x76.png
│ ├── apple-touch-icon.png
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ └── favicon.ico
├── vignettes
├── .gitignore
├── closerlook.Rmd
├── expo.png
├── jspsychr.Rmd
└── recognition.Rmd
└── xtra
└── logo.png
/.Rbuildignore:
--------------------------------------------------------------------------------
1 | ^.*\.Rproj$
2 | ^\.Rproj\.user$
3 | ^_pkgdown\.yml$
4 | ^docs$
5 | ^pkgdown$
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .Rproj.user
2 | .Rhistory
3 | .RData
4 | .Ruserdata
5 | inst/doc
6 | .DS_Store
7 |
--------------------------------------------------------------------------------
/DESCRIPTION:
--------------------------------------------------------------------------------
1 | Package: jspsychr
2 | Title: Templates and functions for writing and running jspsych experiments from R-studio
3 | Version: 0.0.1.0000
4 | Date: 2019-12-13
5 | URL: https://github.com/CrumpLab/jspsychr
6 | Authors@R:
7 | person(given = "Matthew J. C.",
8 | family = "Crump",
9 | role = c("aut", "cre"),
10 | email = "mcrump@brooklyn.cuny.edu",
11 | comment = c(ORCID = "0000-0002-5612-0090"))
12 | Description: Templates and functions for writing and running jspsych experiments from R-studio.
13 | License: MIT + file LICENSE
14 | Encoding: UTF-8
15 | LazyData: true
16 | RoxygenNote: 7.1.2
17 | Imports:
18 | plumber,
19 | jsonlite,
20 | readr,
21 | tidyr,
22 | htmltools,
23 | magrittr
24 | Suggests:
25 | knitr,
26 | rmarkdown
27 | VignetteBuilder: knitr
28 |
--------------------------------------------------------------------------------
/NAMESPACE:
--------------------------------------------------------------------------------
1 | # Generated by roxygen2: do not edit by hand
2 |
3 | export("%>%")
4 | export(basic_html)
5 | export(html_stimulus)
6 | export(resource)
7 | export(run_locally)
8 | export(stimulus_df_to_json)
9 | export(unquote)
10 | export(write_to_script)
11 | importFrom(magrittr,"%>%")
12 |
--------------------------------------------------------------------------------
/Package Helper.R:
--------------------------------------------------------------------------------
1 | # Package helper
2 | library(usethis) # helpful automation functions for common tasks in package development
3 | library(pkgdown) # compile your R package to a website
4 |
5 | pkgdown::build_site()
6 |
7 | # generate description file with your info (need to set your info in advanve)
8 | usethis::use_description()
9 |
10 | # generate readme file, the contents control front page of pkgdown website
11 | usethis::use_readme_md()
12 |
13 | # create a vignette (.Rmd) document that gets compiled and displayed on pkdown website
14 | usethis::use_vignette("recognition", title="Walkthrough to build a Recognition memory experiment")
15 |
16 | pkgdown::template_navbar() # generate yml for controlling navbar
17 |
18 | render_folder_to_docs("slides")
19 |
20 | usethis::use_logo("xtra/logo.png")
21 |
22 | usethis::use_news_md()
23 |
24 | usethis::use_pkgdown()
25 |
26 | usethis::use_package("htmltools")
27 |
28 |
--------------------------------------------------------------------------------
/R/basic_html.R:
--------------------------------------------------------------------------------
1 | # author: Matt Crump
2 | #' compile with minimal html template
3 | #'
4 | #' @param css string, paths to css files
5 | #'
6 | #' @return compiled html document
7 | #' @export
8 | #'
9 | #' @description Useful for creating external htmls in jspsych
10 | #'
11 | #' @examples
12 | #'
13 | #'
14 | basic_html <- function(...){
15 |
16 | template <- system.file("rmarkdown/basic_template.html",package="jspsychr")
17 |
18 | rmarkdown::html_document(
19 | template = template,
20 | ...
21 | )
22 | }
23 |
--------------------------------------------------------------------------------
/R/helpers.R:
--------------------------------------------------------------------------------
1 | # file: helpers.R
2 | # author: Danielle Navarro
3 |
4 |
5 | #' Refer to a resource file
6 | #'
7 | #' @param file path
8 | #' @export
9 | resource <- function(file) {
10 | file.path("resources", file)
11 | }
12 |
13 |
14 | #' Specify js code directly
15 | #'
16 | #' @param x the code as a string
17 | #' @export
18 | unquote <- function(x) {
19 | class(x) <- "json"
20 | x
21 | }
22 |
23 |
24 | get_timestamp <- function() {
25 | tsp <- as.character(Sys.time())
26 | tsp <- gsub("[ :]", "-", tsp)
27 | return(tsp)
28 | }
29 |
30 | get_alphanumeric <- function(n = 5) {
31 | x <- c("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r",
32 | "s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9")
33 | r <- sample(x, size = n, replace = TRUE)
34 | r <- paste(r, collapse = "")
35 | return(r)
36 | }
37 |
--------------------------------------------------------------------------------
/R/html_stimulus.R:
--------------------------------------------------------------------------------
1 | # file: html_stimulus.R
2 | # author: Matt Crump
3 |
4 | #' Write html stimulus description from dataframe
5 | #'
6 | #' @param df data.frame containing stimulus information and css codes in columns
7 | #' @param html_content character column name containing html content to be placed between html element tags
8 | #' @param html_element character the html element tag to use
9 | #' @param column_names vector of column names containing css attribute definitions
10 | #' @param css vector of names containing valid css attribute names
11 | #' @param id character to set the id of the html element, defaults to "my_stim"
12 | #'
13 | #' @return vector of html code defining each stimulus
14 | #' @export
15 | #'
16 | #' @examples
17 | #'
18 | #' # define a data frame with stimulus info
19 | #' stroop_stim <- data.frame(stimulus = length(16),
20 | #' word = rep(c("red","green","blue","yellow"), each=4),
21 | #' color = rep(c("red","green","blue","yellow"), 4),
22 | #' response = rep(c("r","g","b","y"), 4),
23 | #' id = "stroop_stim",
24 | #' fontsize = "16pt")
25 | #'
26 | #' head(stroop_stim)
27 | #'
28 | #' # create html stimulus definition
29 | #' html_stimulus(df = stroop_stim,
30 | #' html_content = "word",
31 | #' html_element = "p",
32 | #' column_names = c("color","fontsize"),
33 | #' css = c("color", "font-size"),
34 | #' id = "id"
35 | #' )
36 | #'
37 | #' # use in a pipe to add stimulus definition to stimuli column
38 | #' library(dplyr)
39 | #' stroop_stim <- data.frame(stimulus = length(16),
40 | #' word = rep(c("red","green","blue","yellow"), each=4),
41 | #' color = rep(c("red","green","blue","yellow"), 4),
42 | #' response = rep(c("r","g","b","y"), 4),
43 | #' id = "stroop_stim",
44 | #' fontsize = "16pt") %>%
45 | #' mutate(stimulus = html_stimulus(df = .,
46 | #' html_content = "word",
47 | #' html_element = "p",
48 | #' column_names = c("color","fontsize"),
49 | #' css = c("color", "font-size"),
50 | #' id = "id"))
51 | #' head(stroop_stim)
52 | #'
53 | #'
54 | html_stimulus <- function(df, html_content, html_element, column_names, css=NULL, id="my_stim"){
55 |
56 | # assign ids
57 | if(!is.null(df$id)){
58 | write_id <- paste("id = '", df[,id],"'", sep="")}
59 | else{
60 | write_id <- paste("id = '", id,"'", sep="")
61 | }
62 |
63 |
64 | # if css is NULL assume column_names are valid css attributes
65 | if(is.null(css)) css <- column_names
66 |
67 | # write style definitions for each css attribute
68 | css_df <- data.frame(row.names=1:dim(df)[1])
69 | for(i in 1:length(column_names)){
70 | css_df[,i] <- paste(css[i],": ", df[,column_names[i]], ";", sep="")
71 | }
72 |
73 | # paste together in one style definition
74 | css_df <- tidyr::unite(css_df, col="style", sep=" ")
75 | write_style <- paste("style = '",css_df$style,"'",sep="")
76 |
77 | #write the html element definition
78 | write_html <- paste("<",html_element," ",
79 | write_id, " ",
80 | write_style,">",
81 | df[,html_content],
82 | "",html_element,">", sep="")
83 |
84 | return(write_html)
85 |
86 | }
87 |
--------------------------------------------------------------------------------
/R/run_locally.R:
--------------------------------------------------------------------------------
1 | # file: run_locally.R
2 | # author: Danielle Navarro
3 | # modifications: Matt Crump
4 | # change xprmntr to jspsychr to avoid future conflict
5 | # added options to run in browser vs viewer, and report port
6 |
7 | #' Run a jspsych experiment
8 | #'
9 | #' @param path path
10 | #' @param show_in string, "viewer" to show in viewer, or "browser" to show in browser
11 | #' @param jspsychr_host host defaults to 127.0.0.1
12 | #' @param jspsychr_port port defaults to 8000
13 | #' @export
14 | run_locally <- function(path = ".",
15 | show_in = "viewer",
16 | jspsychr_host = "127.0.0.1",
17 | jspsychr_port = 8000) {
18 |
19 | pr <- plumber::plumber$new()
20 |
21 | static_site <- file.path(path, "experiment")
22 | data_folder <- file.path(path, "data")
23 | static_router <- plumber::PlumberStatic$new(static_site)
24 |
25 | pr$mount("/", static_router)
26 | pr$handle("POST", "/submit", function(req, res){
27 |
28 | dat <- jsonlite::fromJSON(req$postBody)
29 | dat <- readr::read_csv(dat$filedata)
30 | tsp <- get_timestamp()
31 | file_id <- paste("data", get_timestamp(), get_alphanumeric(10), sep = "_")
32 | dat$file_id <- file_id
33 | dat <- dat[, c(ncol(dat), 1:ncol(dat)-1), drop = FALSE]
34 | readr::write_csv(dat, file.path(data_folder, paste0(file_id, ".csv")))
35 | })
36 |
37 | # add message, and options to display in viewer or browser
38 | message(paste("Point the browser to http://",jspsychr_host,":",jspsychr_port, sep=""))
39 |
40 | if(show_in == "viewer"){
41 | viewer <- getOption("viewer")
42 | viewer(paste("http://",jspsychr_host,":",jspsychr_port, sep=""))
43 | }
44 | if(show_in == "browser") utils::browseURL(paste("http://",jspsychr_host,":",jspsychr_port, sep=""))
45 | #
46 |
47 | pr$run(swagger = FALSE, host=jspsychr_host, port= jspsychr_port)
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/R/stimulus_df_to_json.R:
--------------------------------------------------------------------------------
1 | # author: Matt Crump
2 |
3 | #' Convert stimulus dataframe to json object
4 | #'
5 | #' @param df dataframe containins stimulus column with html for each stimulus, and additional columns for data codes
6 | #' @param stimulus character name of the stimulus column
7 | #' @param data character vector names of columns to include as data codes
8 | #' @param pretty logical true = pretty format, false=not pretty
9 | #' @return string a json object definition that can supply jsPsych with stimulus information
10 | #' @export
11 | #'
12 | #' @examples
13 | #'
14 | #' # create a stimulus dataframe
15 | #' library(dplyr)
16 | #' stroop_stim <- data.frame(stimulus = length(16),
17 | #' word = rep(c("red","green","blue","yellow"), each=4),
18 | #' color = rep(c("red","green","blue","yellow"), 4),
19 | #' response = rep(c("r","g","b","y"), 4),
20 | #' id = "stroop_stim",
21 | #' fontsize = "16pt") %>%
22 | #' mutate(stimulus = html_stimulus(df = .,
23 | #' html_content = "word",
24 | #' html_element = "p",
25 | #' column_names = c("color","fontsize"),
26 | #' css = c("color", "font-size"),
27 | #' id = "id"))
28 | #' head(stroop_stim)
29 | #'
30 | #' # convert to json
31 | #' stimulus_df_to_json(stroop_stim,"stimulus",c("word","color","response"))
32 | #'
33 | stimulus_df_to_json <- function(df,stimulus, data, pretty=TRUE){
34 | temp_list <- list()
35 | for(i in 1:dim(df)[1]){
36 | temp_list[[i]] <- list(stimulus = df[i,stimulus],
37 | data = as.list(df[i,data]))
38 | }
39 | return(jsonlite::toJSON(temp_list, auto_unbox = TRUE, pretty=pretty))
40 | }
41 |
--------------------------------------------------------------------------------
/R/utils-pipe.R:
--------------------------------------------------------------------------------
1 | #' Pipe operator
2 | #'
3 | #' See \code{magrittr::\link[magrittr]{\%>\%}} for details.
4 | #'
5 | #' @name %>%
6 | #' @rdname pipe
7 | #' @keywords internal
8 | #' @export
9 | #' @importFrom magrittr %>%
10 | #' @usage lhs \%>\% rhs
11 | NULL
12 |
--------------------------------------------------------------------------------
/R/write_to_script.R:
--------------------------------------------------------------------------------
1 | # author: Matt Crump
2 | #' Write json to js script
3 | #'
4 | #' @param json_object string a json object
5 | #' @param var_name character default=NULL, set name to declare json object as a variable
6 | #'
7 | #' @return string printed to the html as a
8 | #' @export
9 | #'
10 | #' @description To be used in a knitr code chunk with results="asis"
11 | #'
12 | #' @examples
13 | #'
14 | #'
15 | write_to_script <- function(json_object,var_name=NULL){
16 | if(is.null(var_name)){
17 | return(cat(""))
18 | }else{
19 | return(cat(""))
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # jspsychr
2 |
3 | [](https://www.tidyverse.org/lifecycle/#experimental)
4 |
5 | This is an R markdown template and functions for writing and running jspsych experiments using R studio.
6 |
7 | - [jspsych](https://www.jspsych.org) is javascript library for web-based behavioral experiments written by Josh De Leeuw.
8 |
9 | - If you are interested in other approaches to build jspsych experiments, also check out Danielle Navarro's [xprmntr](https://github.com/djnavarro/xprmntr), and [jaysire](https://github.com/djnavarro/jaysire)
10 |
11 | - jspsychr developed as a forked offshoot of the original xprmntr package
12 |
13 | ## Install
14 |
15 | ```
16 | # install.packages("devtools")
17 | devtools::install_github("CrumpLab/jspsychr")
18 | ```
19 |
20 |
In this task, you will see word in a color
"+ 80 | "BLUE
"+ 81 | "Press r, g, b, or y to identify the color, not the word
"+ 82 | "E.g., press r for red in this example
"+ 83 | "Press any key to begin.
", 84 | post_trial_gap: 1000 85 | }; 86 | 87 | /* defining test timeline */ 88 | var test = { 89 | timeline: [{ 90 | type: 'html-keyboard-response', 91 | choices: ["r","g","b","y"], 92 | trial_duration: 2000, 93 | response_ends_trial: true, 94 | stimulus: jsPsych.timelineVariable('stimulus'), 95 | data: jsPsych.timelineVariable('data'), 96 | on_finish: function(data){ 97 | var correct = false; 98 | if(data.response == 'r' && data.key_press == 82 && data.rt > -1){ 99 | correct = true; 100 | } else if(data.response == 'g' && data.key_press == 71 && data.rt > -1){ 101 | correct = true; 102 | } else if(data.response == 'b' && data.key_press == 66 && data.rt > -1){ 103 | correct = true; 104 | } else if(data.response == 'y' && data.key_press == 89 && data.rt > -1){ 105 | correct = true; 106 | } 107 | data.correct = correct; 108 | }, 109 | post_trial_gap: function() { 110 | return Math.floor(Math.random() * 1500) + 500; 111 | } 112 | }], 113 | timeline_variables: test_stimuli, 114 | sample: {type: 'fixed-repetitions', size: reps_per_trial_type} 115 | }; 116 | 117 | /*defining debriefing block*/ 118 | var debrief = { 119 | type: "html-keyboard-response", 120 | stimulus: function() { 121 | var congruent_rt = Math.round(jsPsych.data.get().filter({correct: true, stim_type: 'congruent'}).select('rt').mean()); 122 | var incongruent_rt = Math.round(jsPsych.data.get().filter({correct: true, stim_type: 'incongruent'}).select('rt').mean()); 123 | return "Your average response time for congruent trials was " + congruent_rt + "ms.
"+ 124 | "Your average response time for incongruent trials was " + incongruent_rt + "ms.
"+ 125 | "Press any key to complete the experiment. Thank you!
"; 126 | } 127 | }; 128 | 129 | /*set up experiment structure*/ 130 | var timeline = []; 131 | timeline.push(welcome); 132 | timeline.push(instructions); 133 | timeline.push(test); 134 | timeline.push(debrief); 135 | 136 | /*start experiment*/ 137 | jsPsych.init({ 138 | timeline: timeline, 139 | on_finish: function() { 140 | jsPsych.data.displayData(); 141 | } 142 | }); 143 | ``` 144 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |The URL variable should be logged to the console
9 | 10 | 21 | 22 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/demo-flanker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla.
22 | 23 |Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc. Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa.
24 | 25 |Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh. Quisque volutpat condimentum velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam nec ante. Sed lacinia, urna non tincidunt mattis, tortor neque adipiscing diam, a cursus ipsum ante quis turpis. Nulla facilisi. Ut fringilla. Suspendisse potenti. Nunc feugiat mi a tellus consequat imperdiet. Vestibulum sapien. Proin quam. Etiam ultrices.
26 | 27 |Suspendisse in justo eu magna luctus suscipit. Sed lectus. Integer euismod lacus luctus magna. Quisque cursus, metus vitae pharetra auctor, sem massa mattis sem, at interdum magna augue eget diam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi lacinia molestie dui. Praesent blandit dolor. Sed non quam. In vel mi sit amet augue congue elementum. Morbi in ipsum sit amet pede facilisis laoreet. Donec lacus nunc, viverra nec, blandit vel, egestas et, augue. Vestibulum tincidunt malesuada tellus.
28 | 29 |Ut ultrices ultrices enim. Curabitur sit amet mauris. Morbi in dui quis est pulvinar ullamcorper. Nulla facilisi. Integer lacinia sollicitudin massa. Cras metus. Sed aliquet risus a tortor. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam.
30 | 31 | 32 | 33 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/end-active-node.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | 17 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/end-experiment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/exclusions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/external_html/simple_consent.html: -------------------------------------------------------------------------------- 1 |This is a demo consent form. Click the checkbox below to indicate the you 2 | would like to participate in the experiment
3 |I agree to take part in this study.
4 | 5 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/1.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/10.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/11.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/12.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/2.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/3.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/4.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/5.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/6.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/7.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/8.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/9.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/of1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/of1.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/of2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/of2.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/of3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/of3.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/om1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/om1.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/om2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/om2.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/om3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/om3.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/yf1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/yf1.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/yf4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/yf4.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/yf5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/yf5.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/ym2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/ym2.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/ym3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/ym3.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/ym5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/age/ym5.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/backwardN.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/backwardN.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/blue.png -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/con1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/con1.png -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/con2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/con2.png -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/fixation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/fixation.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/happy_face_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/happy_face_1.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/happy_face_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/happy_face_2.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/happy_face_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/happy_face_3.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/happy_face_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/happy_face_4.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/inc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/inc1.png -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/inc2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/inc2.png -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/normalN.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/normalN.gif -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/orange.png -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/redX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/redX.png -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/ribbon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/ribbon.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/sad_face_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/sad_face_1.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/sad_face_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/sad_face_2.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/sad_face_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/sad_face_3.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/sad_face_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrumpLab/jspsychr/369cf2dede2c82976d51ac3a8f260c81439f049a/inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/img/sad_face_4.jpg -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-animation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-audio-button-response.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 45 | 46 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-audio-keyboard-response.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-audio-slider-response.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-call-function.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 32 | 33 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-categorize-animation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-categorize-html.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-categorize-image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-cloze.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 16 | 41 | 42 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-free-sort.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 24 | 25 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-fullscreen.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | 17 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-html-button-response.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 46 | 47 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-html-keyboard-response.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-html-slider-response.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-image-button-response.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 48 | 49 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-image-keyboard-response.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-image-slider-response.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-instructions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 26 | 27 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-rdk.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 58 | 59 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-reconstruction.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 43 | 44 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-resize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 34 | 35 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-same-different-html.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-same-different-image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-serial-reaction-time-mouse.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-serial-reaction-time.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-survey-html-form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-survey-likert.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 42 | 43 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-survey-multi-choice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 40 | 41 | -------------------------------------------------------------------------------- /inst/rmarkdown/templates/jspsychr/skeleton/experiment/jspsych-6-2/examples/jspsych-survey-multi-select.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |