powered by
Make data.frame with matrix
matrix2df(matrix = c(1, 1, 1, 0, 0, 1), labels = NULL)
a numeric vector
Optional list of labels
labels=list(X="indep",M=c("med1","med2"),Y="dep") matrix2df(c(1,1,1,0,0,1),labels=labels)
Run the code above in your browser using DataLab