Takes in a symbol/grapheme and sets of response times/colors, then creates a Grapheme instance that holds the passed information and returns it.

create_grapheme(
  symbol,
  response_times = NULL,
  response_colors,
  color_space_spec = "Luv"
)

Arguments

symbol

A one-element character vector holding a symbol/grapheme.

response_times

(optional) A numeric vector. Times from presentation to response, in order.

response_colors

A character vector. Response colors, as hex color codes.

color_space_spec

A one-element character vector. What color space is to be used? The following color spaces are supported: "XYZ", "sRGB", "Apple RGB", "Lab", and "Luv"

Examples

create_grapheme(symbol="a", response_times=c(2.3, 6.7, 0.4),
response_colors=c("84AE99", "9E3300", "000000"), color_space_spec="Luv")
#> Reference class object of class "Grapheme"
#> Field "symbol":
#> [1] "a"
#> Field "response_colors":
#>          [,1]      [,2]     [,3]
#> [1,] 67.60265 -21.34313 11.89985
#> [2,] 37.31578  86.01643 30.79221
#> [3,]  0.00000   0.00000  0.00000
#> Field "response_times":
#> [1] 2.3 6.7 0.4
#> Field "color_space":
#> [1] "Luv"