Learn R Programming

SemNetCleaner (version 1.1.5)

destr: De-string Responses

Description

De-string responses after performing textcleaner

Usage

destr(rmat, column, sep)

Arguments

rmat

A textcleaner filtered response matrix

column

The column number or name of the stringed response

sep

Separating string character (e.g., " ", ".", ","). Must be input as a character

Value

A list containing four objects:

rmat

A response matrix that has been de-stringed

part

The row number is supplied for each case that was affected. This can be used to replicate the de-stringing process and to keep track of changes more generally

added

Stringed responses that were added to the response matrix

removed

Stringed responses that were removed from the response matrix

Examples

Run this code
# NOT RUN {
# Toy example
raw <- open.animals[c(1:10),-c(1:3)]

# Clean and prepocess data
clean <- textcleaner(raw, partBY = "row", dictionary = "animals")

# Obtain binary data
bin <- clean$binary

# Change column name as an example
colnames(bin)[1] <- "alpaca.ant.antelope"

# De-string
if(interactive())
{convmat <- destr(bin, "alpaca.ant.antelope", ".")}

# }

Run the code above in your browser using DataLab