correct.changes: Correct Changes from 'textcleaner'

Description Usage Arguments Value Author(s) Examples

View source: R/correct.changes.R

Description

A function that corrects changes that were made automatically by textcleaner

Usage

1
correct.changes(textcleaner.obj)

Arguments

textcleaner.obj

Object from textcleaner

Value

This function returns the corrected lists from textcleaners:

binary

A matrix of responses where each row represents a participant and each column represents a unique response. A response that a participant has provided is a '1' and a response that a participant has not provided is a '0'

responses

A list containing two objects:

  • clean A response matrix that has been spell-checked and de-pluralized with duplicates removed. This can be used as a final dataset for analyses (e.g., fluency of responses)

  • original The original response matrix that has had white spaces before and after words response. Also converts all upper-case letters to lower case

spellcheck

A list containing three objects:

  • full All responses regardless of spell-checking changes

  • auto Only the incorrect responses that were changed during spell-check

  • changes Only the changes made within the function correct.changes

removed

A list containing two objects:

  • rows Identifies removed participants by their row (or column) location in the original data file

  • ids Identifies removed participants by their ID (see argument data)

partChanges

A list where each participant is a list index with each response that was been changed. Participants are identified by their ID (see argument data). This can be used to replicate the cleaning process and to keep track of changes more generally. Participants with NA did not have any changes from their original data and participants with missing data are removed (see removed$ids)

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>

Examples

1
2
3
4
5
6
7
8
# Toy example
raw <- open.animals[c(1:10),-c(1:3)]

if(interactive())
{
    #Full test
    clean <- textcleaner(open.animals[,-c(1,2)], partBY = "row", dictionary = "animals")
}

SemNetCleaner documentation built on Sept. 16, 2021, 5:12 p.m.