create_job_db: Create a codingjob database

View source: R/live_server.r

create_job_dbR Documentation

Create a codingjob database

Description

Creates an RSQlite database, that can be used in start_annotator

Usage

create_job_db(codingjob, db_path = getwd(), overwrite = FALSE)

Arguments

codingjob

A codingjob, created with create_job

db_path

The path where the folder with coding job DBs is stored. Default is working directory. If you don't want to store annotations beyond this session, use tempdir().

overwrite

You're not allowed to create two jobs with the same title (which also becomes the DB filename). Or well, you're allowed to, but you have to say overwrite is TRUE so you can't blame us if you accidentally delete any hard-earned annotations.

Value

The job database file, that can be used in gimme_annotation()

Examples

sentiment <- annotation_variable("sentiment", "assign sentiment to words",
  codes = c(red = "Negative", grey = "Neutral", green = "Positive")
)
codingjob <- create_job(
  "Sotu sentiment",
  create_units(mini_sotu, id = "id", set_text("text", text), meta = c("name", "year")),
  create_codebook(sentiment)
)
## Not run: 
job_db <- create_job_db(codingjob)

## End(Not run)

ccs-amsterdam/ccsAnnotator documentation built on March 19, 2024, 2:14 a.m.