| Title: | Qualtrics for Labelling Text using R |
|---|---|
| Description: | Functions to convert text data for labelling into format appropriate for importing into Qualtrics. Supports multiple language, including right-to-left scripts as well as different response types. Outputs an Advance Format .txt file that can be read into Qualtrics. |
| Authors: | Christopher Barrie [aut, cre] (ORCID: <https://orcid.org/0000-0002-9156-990X>) |
| Maintainer: | Christopher Barrie <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-24 06:10:57 UTC |
| Source: | https://github.com/cjbarrie/quiltr |
A dataset containing one hundred paragraphs of politics labelled news from the SANAD Arabiya news data
arabiya_textarabiya_text
A data frame with 100 rows and 1 variable:
Paragraphs of Arabiya politics news
...
https://data.mendeley.com/datasets/57zpx667y9/2
stringi
A dataset containing one hundred paragraphs of lipsum text
lipsum_textlipsum_text
A data frame with 100 rows and 1 variable:
Paragraphs of (pseudo) random lorem ipsum text
...
https://www.rdocumentation.org/packages/stringi/versions/1.5.3/topics/stri_rand_lipsum
quilt_form_data
A dataset containing one hundred paragraphs of lipsum text with columns for text (prompt), response_type and ID
qdatqdat
A data frame with 100 rows and 3 variables:
Paragraphs of (pseudo) random lorem ipsum text
Response options separated with semi-colons
Unique ID assigned to the text
...
https://www.rdocumentation.org/packages/stringi/versions/1.5.3/topics/stri_rand_lipsum
Create text labelling form for importing to Qualtrics
quilt_form(input_data, page_break_every = 0, question_type, filename)quilt_form(input_data, page_break_every = 0, question_type, filename)
input_data |
data.frame: input data generated with |
page_break_every |
integer: number of text examples before page break; default is 0 |
question_type |
character vector: one of c("dropdown", "select", "multiselect", "singleanswer", "multianswer", "rankorder", "singleline", "essay" ) |
filename |
name of survey .txt form generated, e.g. "quilted_form.txt." |
a .txt survey file
## Not run: data(lipsum_text) qdat <- quilt_form_data(prompt = "Label this text: ", text = lipsum_text$text, response_type = "scale", nlow = 1, nhigh = 10, addID = T) quilt_form(input_data = qdat, page_break_every = 1, question_type = "multianswer", filename = "test/testing.txt") ## End(Not run)## Not run: data(lipsum_text) qdat <- quilt_form_data(prompt = "Label this text: ", text = lipsum_text$text, response_type = "scale", nlow = 1, nhigh = 10, addID = T) quilt_form(input_data = qdat, page_break_every = 1, question_type = "multianswer", filename = "test/testing.txt") ## End(Not run)
quilt_write_form()
Format text data to structure needed for quilt_write_form()
quilt_form_data( prompt = NULL, text, response_type, options, addID = TRUE, nlow, nhigh, remove_NA = FALSE )quilt_form_data( prompt = NULL, text, response_type, options, addID = TRUE, nlow, nhigh, remove_NA = FALSE )
prompt |
character string: prompt of text for labelling, e.g.: "Label this text: "; defaults to |
text |
character vector: text inputs for labelling |
response_type |
character vector: one of c("yesno", "options", "scale", "text") |
options |
character vector of response options: e.g., c("big", "small", "biggie smalls") |
addID |
add an ID variable to the text data |
nlow |
integer: low end of numeric scale |
nhigh |
integer: high end of numeric scale |
remove_NA |
if |
a data.frame
## Not run: data(lipsum_text) qdat <- quilt_form_data(prompt = "Label this text: ", text = lipsum_text$text, response_type = "yesno", addID = T) qdat <- quilt_form_data(prompt = "Label this text: ", text = lipsum_text$text, response_type = "options", options = c("Not at all", "Somewhat", "Very much"), addID = T) qdat <- quilt_form_data(prompt = "Label this text: ", text = lipsum_text$text, response_type = "scale", nlow = 1, nhigh = 10, addID = T) ## End(Not run)## Not run: data(lipsum_text) qdat <- quilt_form_data(prompt = "Label this text: ", text = lipsum_text$text, response_type = "yesno", addID = T) qdat <- quilt_form_data(prompt = "Label this text: ", text = lipsum_text$text, response_type = "options", options = c("Not at all", "Somewhat", "Very much"), addID = T) qdat <- quilt_form_data(prompt = "Label this text: ", text = lipsum_text$text, response_type = "scale", nlow = 1, nhigh = 10, addID = T) ## End(Not run)