Running examples in 'gtx-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: combine.moments2
> ### Title: Builds a matrix of second moments for a set of individuals, from
> ###   the matrices of second moments for all constituent subsets of
> ###   individuals.
> ### Aliases: combine.moments2
> 
> ### ** Examples
> 
> data(mthfrex)
> ## artifical example with two datasets obtained by
> ## splitting mthfrex by the HTN variable
> 
> xtx.hi <- make.moments2(mthfr.params, c("SBP", "SexC", "Age"),
+                         as.snpdata(list(snpinfo = mthfrex$snpinfo,
+                                    data = subset(mthfrex$data, HTN == 1))))
> 
> xtx.lo <- make.moments2(mthfr.params, c("SBP", "SexC", "Age"),
+                         as.snpdata(list(snpinfo = mthfrex$snpinfo,
+                                    data = subset(mthfrex$data, HTN == 0))))
> 
> ## make list of X'X matrices
> xtx.list <- list(hi = xtx.hi, lo = xtx.lo)
> 
> ## combine for outcome SBP and fixed effects for all SNPs
> ## other variables SexC and Age will be treated as study-specific
> fixed <- paste(mthfr.params$snp, mthfr.params$coded.allele, sep = "_")
> xtx.comb <- combine.moments2(xtx.list, c("SBP", fixed))
> 
> ## fit regression model
> n.comb <- sum(diag(xtx.comb)[1:length(xtx.list)])
> lm.moments2(xtx.comb, "SBP", c("hi_ONE", "lo_ONE", "rs4846052_T"), n = n.comb)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
gtx
 --- call from context --- 
is.moments2(xtwx)
 --- call from argument --- 
if (class(object) != "moments2") return(FALSE)
 --- R stacktrace ---
where 1: is.moments2(xtwx)
where 2: est.moments2(xtx, leftvar, rightvars, n, vscale = NULL)
where 3: lm.moments2(xtx.comb, "SBP", c("hi_ONE", "lo_ONE", "rs4846052_T"), 
    n = n.comb)

 --- value of length: 2 type: logical ---
[1] TRUE TRUE
 --- function from context --- 
function (object) 
{
    if (class(object) != "moments2") 
        return(FALSE)
    if (!is.matrix(object)) 
        return(FALSE)
    if (nrow(object) != ncol(object)) 
        return(FALSE)
    if (any(rownames(object) != colnames(object))) 
        return(FALSE)
    return(TRUE)
}
<bytecode: 0x59f5db0>
<environment: namespace:gtx>
 --- function search by body ---
Function is.moments2 in namespace gtx has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(object) != "moments2") return(FALSE) : 
  the condition has length > 1
Calls: lm.moments2 -> est.moments2 -> is.moments2
Execution halted