Learn R Programming

QCA (version 0.6-5)

createString: Create a vector of strings containing combinations of presence/absence of conditions

Description

The function takes the values from the dataset (0 or 1) and writes the corresponding lower/upper column names.

Usage

createString(mydata, use.letters=TRUE, uplow=TRUE)

Arguments

mydata
a matrix or a dataframe
use.letters
logical, use letters instead of column names
uplow
logical, use upper/lower notation if possible, for binary data

Value

  • A vector of strings, with length equal to the number of rows in mydata

See Also

createChart

Examples

Run this code
test.dataset <- data.frame(First=c(1,1), Second=c(0,1), Third=c(0,0))
createString(test.dataset) # "Abc" "ABc"

# using the column names instead of letters
createString(test.dataset, use.letters=FALSE)

Run the code above in your browser using DataLab