| Title: | Qualtrics for Labelling Text using R | 
| Version: | 0.1.0 | 
| 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 read into Qualtrics. | 
| License: | MIT + file LICENSE | 
| Language: | en-US | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 7.1.1 | 
| Suggests: | covr, knitr, rmarkdown, testthat (≥ 3.0.0) | 
| Config/testthat/edition: | 3 | 
| Depends: | R (≥ 2.10) | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Packaged: | 2021-12-02 10:24:57 UTC; cbarrie6 | 
| Author: | Christopher Barrie | 
| Maintainer: | Christopher Barrie <christopher.barrie@ed.ac.uk> | 
| Repository: | CRAN | 
| Date/Publication: | 2021-12-02 13:40:07 UTC | 
Arabiya politics text from SANAD dataset
Description
A dataset containing one hundred paragraphs of politics labelled news from the SANAD Arabiya news data
Usage
arabiya_text
Format
A data frame with 100 rows and 1 variable:
- text
- Paragraphs of Arabiya politics news 
...
Source
https://data.mendeley.com/datasets/57zpx667y9/2
Lipsum text from stringi
Description
A dataset containing one hundred paragraphs of lipsum text
Usage
lipsum_text
Format
A data frame with 100 rows and 1 variable:
- text
- Paragraphs of (pseudo) random lorem ipsum text 
...
Source
https://www.rdocumentation.org/packages/stringi/versions/1.5.3/topics/stri_rand_lipsum
Dataset generated with quilt_form_data
Description
A dataset containing one hundred paragraphs of lipsum text with columns for text (prompt), response_type and ID
Usage
qdat
Format
A data frame with 100 rows and 3 variables:
- prompt
- Paragraphs of (pseudo) random lorem ipsum text 
- response_type
- Response options separated with semi-colons 
- id
- Unique ID assigned to the text 
...
Source
https://www.rdocumentation.org/packages/stringi/versions/1.5.3/topics/stri_rand_lipsum
Create text labelling form for importing to Qualtrics
Description
Create text labelling form for importing to Qualtrics
Usage
quilt_form(input_data, page_break_every = 0, question_type, filename)
Arguments
| 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." | 
Value
a .txt survey file
Examples
## 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)
Format text data to structure needed for quilt_write_form()
Description
Format text data to structure needed for quilt_write_form()
Usage
quilt_form_data(
  prompt = NULL,
  text,
  response_type,
  options,
  addID = TRUE,
  nlow,
  nhigh,
  remove_NA = FALSE
)
Arguments
| 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  | 
Value
a data.frame
Examples
## 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)