Learn R Programming

SemNetCleaner (version 1.0.0)

autoDestr: Automated De-string of Responses

Description

Automated de-string responses after performing textcleaner. This function is to streamlines the de-stringing of like responses with other like responses (e.g., "roaches" with "cockroaches") into one singular function.

Usage

autoDestr(rmat, char = 10)

Arguments

rmat

Binary matrix. A textcleaner filtered response matrix

char

A numeric value. Minimum number of characters in a string to be checked for by destr. Defaults to 10

Value

A list containing two objects:

rmat

A response matrix that has been de-stringed

string

A list containing the responses that were de-stringed. 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

Examples

Run this code
# NOT RUN {
#create example stringed responses
stringed <- cbind(rowSums(cbind(rmat[,c(1,2)])),convmat)

#change name to stringed name
colnames(stringed)[1] <- "alligator.ant"

# }
# NOT RUN {
#text cleaned
clean <- textcleaner(rmat)

#automated de-string
convmat <- autoDestr(clean, 10)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab