Running examples in ‘umx-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: xmu_make_TwinSuperModel
> ### Title: Helper to make a basic top, MZ, and DZ model.
> ### Aliases: xmu_make_TwinSuperModel
> 
> ### ** Examples
> 
> # ==============
> # = Continuous =
> # ==============
> library(umx)
> data(twinData)
> twinData = umx_scale(twinData, varsToScale= c('ht1','ht2'))
> mzData = twinData[twinData$zygosity %in%  "MZFF",] 
> dzData = twinData[twinData$zygosity %in%  "DZFF",]
> m1= xmu_make_TwinSuperModel(mzData=mzData, dzData=dzData, selDVs=c("wt","ht"), sep="", nSib=2)
> names(m1) # "top" "MZ"  "DZ"
 [1] "top"          "MZ"           "DZ"           "fitfunction"  "name"        
 [6] "matrices"     "algebras"     "constraints"  "data"         "submodels"   
[11] "output"       "compute"      "options"      "intervals"    "manifestVars"
[16] "latentVars"  
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionML"
[1] TRUE
> 
> # ====================
> # = With a covariate =
> # ====================
> 
> m1= xmu_make_TwinSuperModel(mzData=mzData, dzData=dzData, 
+ 		selDVs= "wt", selCovs= "age", sep="", nSib=2)
1 row(s) dropped from 'data' due to missing definition variable(s)
> m1$top$intercept$labels
      wt1             wt2            
means "intercept_wt1" "intercept_wt1"
> m1$MZ$expMean
mxAlgebra 'expMean' 
$formula:  top.intercept + cbind(T1DefVars %*% top.meansBetas, T2DefVars %*% top.meansBetas) 
$result: (not yet computed) <0 x 0 matrix>
dimnames:
[[1]]
[1] "means"

[[2]]
[1] "wt1" "wt2"

> 
> # ===============
> # = WLS example =
> # ===============
> m1=xmu_make_TwinSuperModel(mzData=mzData, dzData=dzData,selDVs=c("wt","ht"),sep="",type="WLS")
Data treated as WLS
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionWLS"
[1] TRUE
> m1$MZ$fitfunction$type =="WLS"
[1] TRUE
> # Check default all-continuous method
> m1$MZ$fitfunction$continuousType == "cumulants"
[1] TRUE
> 
> # Choose non-default type (DWLS)
> m1= xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData,
+ 	selDVs= c("wt","ht"), sep="", type="DWLS")
Data treated as DWLS
> m1$MZ$fitfunction$type =="DWLS"
[1] TRUE
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionWLS"
[1] TRUE
> 
> # Switch WLS method
> m1 = xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData, selDVs= c("wt","ht"), sep= "",
+   type = "WLS", allContinuousMethod = "marginals")
Data treated as WLS
> m1$MZ$fitfunction$continuousType == "marginals"
[1] TRUE
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionWLS"
[1] TRUE
> 
> 
> # ============================================
> # = Bivariate continuous and ordinal example =
> # ============================================
> data(twinData)
> selDVs = c("wt", "obese")
> # Cut BMI column to form ordinal obesity variables
> ordDVs          = c("obese1", "obese2")
> obesityLevels   = c('normal', 'overweight', 'obese')
> cutPoints       = quantile(twinData[, "bmi1"], probs = c(.5, .2), na.rm = TRUE)
> twinData$obese1 = cut(twinData$bmi1, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels) 
> twinData$obese2 = cut(twinData$bmi2, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels) 
> # Make the ordinal variables into mxFactors (ensure ordered is TRUE, and require levels)
> twinData[, ordDVs] = umxFactor(twinData[, ordDVs])
> mzData = twinData[twinData$zygosity %in%  "MZFF",] 
> dzData = twinData[twinData$zygosity %in%  "DZFF",]
> m1 = xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData, selDVs= selDVs, sep="", nSib= 2)
Found 1 pair(s) of ordinal variables:'obese1' and 'obese2' (No binary)
1 pair(s) of continuous variables:'wt1'
Polite note: please use fullVarNames instead of selDVs when calling umxThresholdMatrix
> names(m1) # "top" "MZ"  "DZ" 
 [1] "top"          "MZ"           "DZ"           "fitfunction"  "name"        
 [6] "matrices"     "algebras"     "constraints"  "data"         "submodels"   
[11] "output"       "compute"      "options"      "intervals"    "manifestVars"
[16] "latentVars"  
> 
> # ==============
> # = One binary =
> # ==============
> data(twinData)
> cutPoints       = quantile(twinData[, "bmi1"], probs = .2, na.rm = TRUE)
> obesityLevels   = c('normal', 'obese')
> twinData$obese1 = cut(twinData$bmi1, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels) 
> twinData$obese2 = cut(twinData$bmi2, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels) 
> ordDVs = c("obese1", "obese2")
> twinData[, ordDVs] = umxFactor(twinData[, ordDVs])
> selDVs = c("wt", "obese")
> mzData = twinData[twinData$zygosity %in% "MZFF",]
> dzData = twinData[twinData$zygosity %in% "DZFF",]
> m1 = xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData, selDVs= selDVs, sep= "", nSib= 2)
Found 1 pairs of binary variables:'obese1' and 'obese2'

I am fixing the latent means and variances of these variables to 0 and 1

and 1 pairs of continuous variables:'wt1'
Polite note: please use fullVarNames instead of selDVs when calling umxThresholdMatrix
Error in matrix(labels, nrow, ncol, byrow = byrow) : 
  data length differs from size of matrix: [2 != 1 x 1]
Calls: xmu_make_TwinSuperModel ... mxMatrix -> imxCreateMatrix -> imxCreateMatrix -> matrix
Execution halted