# Iris data
# Loading the numeric variables of iris data
iris <- as.matrix(iris[,-5])
# No constraint on variables
out <- disfa(iris, Q = 2)
# Constraint: the first two variables must contribute to the same factor.
outc <- disfa(iris, Q = 2, constr = c(1,1,0,0))
Run the code above in your browser using DataLab