| annotate_faces | R Documentation |
Starts the coding page of an annotation_task from R and
opens it in the web browser. Each answer is saved in the task's
results folder as soon as the coder gives it, so closing the
browser or R loses nothing, and a coder who comes back continues where
they stopped.
annotate_faces(
task,
coder = NULL,
open = interactive(),
port = NULL,
inline = .te_in_notebook(),
max_side = 640
)
task |
An |
coder |
The coder id to start with. Default: the page asks. |
open |
Logical. Open the page in the web browser. Default is
|
port |
Port of the local server. Default is a free port chosen at random. |
inline |
Logical. Show the coding page inside the notebook, below the
cell. Default is |
max_side |
Longest side, in pixels, of the pictures in a notebook page, which stores them in the notebook. Default 640. |
The page is served by R (with httpuv) on your own computer only
(127.0.0.1), at an address with a random part, and keeps running
while you use R. Coders press the number keys to answer, Enter for the
next item, and Backspace to undo.
Coders on other computers can open page/index.html of the task
from a copy of the folder instead. Their page keeps answers in that
browser and ends with Export annotations; put the exported files
in the task's results folder.
In a Jupyter notebook, including Google Colab, the coding page is shown
below the cell instead (inline = TRUE, the default there), because
a page served from R cannot be reached from a notebook running on another
computer. Its Copy R code button gives a line such as
answers <- read_annotations(task, "te-annotations:...") to run in
a new cell. The line holds every answer given so far, so copy it again
after more coding; keep the last one, as the answers are not saved in the
task's results folder.
Invisibly, the page: a list with its url and
stop(), which stops the server. With inline = TRUE,
invisibly, the path of the page as one self-contained file.
read_annotations, annotation_progress
## Not run:
coding <- annotate_faces("annotation-round-1", coder = "C01")
annotation_progress("annotation-round-1")
coding$stop()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.