
Last chance! 50% off unlimited learning
Sale ends in
This code is a simplified form of expandCmd
from the lavaan package.
It separates hyphenated variable strings into a list of vectors, while ignoring
hyphens that may be used in numbers.
separateHyphens(cmd)
A character string
The character string if no hyphens, or a list of vectors if there are hyphens.
Note that this is an internal function only.
# NOT RUN {
MplusAutomation:::separateHyphens("x1x4")
MplusAutomation:::separateHyphens("x1-x4")
MplusAutomation:::separateHyphens("x1-x4; x1*-1; v1-v3;")
# }
Run the code above in your browser using DataLab