draw | R Documentation |
Draws single figures, matrices with 9 or 4 cells, or response list of a matriks
draw(
obj,
main = NULL,
canvas = TRUE,
hide = FALSE,
bg = "white",
mar = c(1, 1, 1, 1),
xlim = 16,
...
)
## S3 method for class 'figure'
draw(
obj,
main = NULL,
canvas = TRUE,
hide = FALSE,
bg = "white",
mar = c(1, 1, 1, 1),
xlim = 16,
...
)
## S3 method for class 'matriks'
draw(
obj,
main = NULL,
canvas = TRUE,
hide = FALSE,
bg = "white",
mar = c(1, 1, 1, 1),
xlim = 16,
...
)
## S3 method for class 'responses'
draw(
obj,
main = NULL,
canvas = TRUE,
hide = FALSE,
bg = "white",
mar = c(1, 1, 1, 1),
xlim = 16,
distractors = NULL,
print = FALSE,
...
)
obj |
The figure/matriks/response list to be drawn |
main |
logical, print the title of the drawing. Default is FALSE |
canvas |
logical, draw the figure on a new canvas. Default is TRUE |
hide |
logical, hide the cell corresponding to the correct response. Default is FALSE |
bg |
character, define the color background. Default is white |
mar |
numeric vector, change margins of the canvas |
xlim |
numeric, change the length of the x axis |
... |
other arguments |
distractors |
character, names of the distractors to be printed |
print |
logical, print all the distractors together (default, FALSE) or one by one (TRUE) |
A graphic
A graphic of the figure
A graphic of the matriks
A graphic of the matriks
draw(figure)
: Draw figure
Draw a figure
draw(matriks)
: Draw Matriks
Draw a matriks
draw(responses)
: Draw response list
Draw the response list of a matriks
# draw a circle
draw(circle())
# draw a circle inside the first circle
draw(size(circle(), 2), canvas = FALSE)
# draw a circle
draw.figure(circle())
# draw a circle inside the other
draw.figure(size(circle(), 2), canvas = FALSE)
# draw a matriks
my_mat <- mat_apply(cof(circle(), luck(), pacman()), "shade", "shape")
draw(my_mat)
# generate a matriks
my_mat1 <- mat_apply(cof(s_axe(), luck(), pacman()), "rotate", "shape")
my_mat2 <- mat_apply(dot(), "shade", "shade")
my_mat <- com(my_mat1, my_mat2)
# generate a response list
my_resp <- response_list(my_mat)
# draw response list
draw(my_resp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.