codeByRegex | R Documentation |
Adds code tags to certain passages of a character vector.
codeByRegex(corpus, passage, coding = "code", context = 0, mess = T, assign = F, subcorpus = NULL, partial = F, prepare = T)
corpus |
Character vector containing one document per element. |
passage |
Character element containing a regular expression that describes the passages that are to be coded. |
coding |
Character element containing the label of the code tag. Defaults to "code". |
context |
Numeric element specifying the context that is to be coded: 0 for coding only words, 2 for coding sentences, 3 for coding whole documents. Defaults to 0 |
mess |
Logical element. If T (default) there will be a message containing the coded corpus. |
assign |
Logical element. If T the corpus will be saved in the global environment. Defaults to F. |
subcorpus |
Numeric vector specifying which documents of the corpus to code. If NULL (default) the whole corpus will be coded. |
partial |
Logical element specifying whether words that contain the passage (without being identical to it) should also be coded. Defaults to F. |
prepare |
Logical element specifying whether to exclude newline-characters from the corpus before coding. Defaults to T. |
Adds code tags to certain passages of a character vector.
codeByPassage("hello world hello world hello world hello world","hello","code1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.