explodeMatch: Explode a Match interaction into a data frame

Description Usage Arguments Details Value Examples

View source: R/match.R

Description

Explode a Match interaction into a data frame

Usage

1
explodeMatch(resp, vals.as.numeric = T, variables.in.columns = F)

Arguments

resp

The response column from TAO or a matchObject from makeMatch()

vals.as.numeric

Convert values to numeric (by removing letters and other non-numeric parts of value)

variables.in.columns

Boolean. Set to use columns as variables instead of rows.

Details

This function is used when a Match interaction is used to ask a number of questions (in rows) with shared response options (in columns)

Value

Returns a data.frame

Examples

1
2
3
4
matchresponse<-c("[agree q1; disagree q2; agree q3; disagree q4]","[agree q1; disagree q2; agree q3; agree q4]")
explodeMatch(matchresponse,vals.as.numeric=F)
matchresponse<-c("[annoyed mail1; angry mail2]","[annoyed mail2; angry mail2]")
explodeMatch(matchresponse,vals.as.numeric=F,variables.in.columns=T)

openPCI/OpenPCIScoring documentation built on June 10, 2021, 1:18 p.m.