job_add_data: Uploads data to a CrowdFlower Job

Description Usage Arguments Value References See Also Examples

Description

job_add_data uploads data from a data.frame to a CrowdFlower Job

Usage

1
job_add_data(id, data, force = FALSE, verbose = TRUE, ...)

Arguments

id

ID for job to be updated.

data

A filename or data.frame with data to be uploaded.

force

A logical indicating whether to force the upload even when column names do not match existing headers.

verbose

A logical indicating whether to print additional information about the request.

...

Additional arguments passed to cf_query.

Value

A character string containing the job ID, invisibly.

References

Crowdflower API documentation

See Also

job_update, job_status, report_get

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
# create new job
f1 <- system.file("templates/instructions1.html", package = "crowdflower")
f2 <- system.file("templates/cml1.xml", package = "crowdflower")
j <- job_create(title = "Job Title", 
                instructions = readChar(f1, nchars = 1e8L),
                cml = readChar(f2, nchars = 1e8L))

# add data
d <- data.frame(variable = 1:3)
job_add_data(id = j, data = d)

# launch job
job_launch(id = j)

# get results for job
report_regenerate(id = j, report_type = "full")
report_get(id = j, report_type = "full")

# delete job
job_delete(j)

## End(Not run)

cloudyr/crowdflower documentation built on May 13, 2019, 8:20 p.m.