Creates an object for Regular Expression coding. No need to call this directly, create.code is a nice wrapper around this and any other types of Codes

Value

RegexCode object Create RegexCode

Super class

ncodeR::Code -> RegexCode

Public fields

expressions

Character vector of regular expressions

metadata

TBD

Methods

Public methods

Inherited methods

Method new()

Usage

RegexCode$new(name, definition, ..., excerpts = NULL, expressions = NULL)

Arguments

name

TBD

definition

TBD

...

TBD

excerpts

TBD

expressions

TBD

Returns

Process Code


Method process()

Usage

RegexCode$process(excerpts = self$excerpts)

Arguments

excerpts

Options excerpts to code

Returns

Code results Add word


Method add()

Usage

RegexCode$add(word)

Arguments

word

To add to expressions

Returns

NULL Remove word


Method remove()

Usage

RegexCode$remove(word)

Arguments

word

to remove

Returns

NULL Concatenate expressions


Method concat()

Usage

RegexCode$concat()

Returns

character of concatentated expressions


Method clone()

The objects of this class are cloneable with this method.

Usage

RegexCode$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

data(RS.data) rs = RS.data # Generate a Code newcode = RegexCode$new(name = "New Code", definition = "Some definition", excerpts = rs$text, expressions = c("number","data"))