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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: normalize
> ### Title: Normalize a metabolomics dataset
> ### Aliases: normalize
> 
> ### ** Examples
> 
> data(mix)
> normalize(mix, "crmn", factor="type", ncomp=3)
ExpressionSet (storageMode: lockedEnvironment)
assayData: 35 features, 42 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: STDs_1_2_1 STDs_1_2_2 ... STDs3_3_11 (42 total)
  varLabels: type experiment runorder
  varMetadata: labelDescription
featureData
  featureNames: 15 18 ... 249 (35 total)
  fvarLabels: mark tag ... preferred (7 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: readGCMS(expfile = "../../data/081228_tomato02_dilution_nv_MetMat_ABS/081228_tomato02_dilution_MetMat_abs.txt", pdatafile = "../../data/pheno2.csv", convid = function(x) gsub("_Di", "", x), standards = TRUE, tables = "preferred") 
> #other methods
> normalize(mix, "one")
ExpressionSet (storageMode: lockedEnvironment)
assayData: 35 features, 42 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: STDs_1_2_1 STDs_1_2_2 ... STDs3_3_11 (42 total)
  varLabels: type experiment runorder
  varMetadata: labelDescription
featureData
  featureNames: 15 18 ... 249 (35 total)
  fvarLabels: mark tag ... preferred (7 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: readGCMS(expfile = "../../data/081228_tomato02_dilution_nv_MetMat_ABS/081228_tomato02_dilution_MetMat_abs.txt", pdatafile = "../../data/pheno2.csv", convid = function(x) gsub("_Di", "", x), standards = TRUE, tables = "preferred") 
> normalize(mix, "avg")
ExpressionSet (storageMode: lockedEnvironment)
assayData: 35 features, 42 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: STDs_1_2_1 STDs_1_2_2 ... STDs3_3_11 (42 total)
  varLabels: type experiment runorder
  varMetadata: labelDescription
featureData
  featureNames: 15 18 ... 249 (35 total)
  fvarLabels: mark tag ... preferred (7 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: readGCMS(expfile = "../../data/081228_tomato02_dilution_nv_MetMat_ABS/081228_tomato02_dilution_MetMat_abs.txt", pdatafile = "../../data/pheno2.csv", convid = function(x) gsub("_Di", "", x), standards = TRUE, tables = "preferred") 
> normalize(mix, "nomis")
ExpressionSet (storageMode: lockedEnvironment)
assayData: 35 features, 42 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: STDs_1_2_1 STDs_1_2_2 ... STDs3_3_11 (42 total)
  varLabels: type experiment runorder
  varMetadata: labelDescription
featureData
  featureNames: 15 18 ... 249 (35 total)
  fvarLabels: mark tag ... preferred (7 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: readGCMS(expfile = "../../data/081228_tomato02_dilution_nv_MetMat_ABS/081228_tomato02_dilution_MetMat_abs.txt", pdatafile = "../../data/pheno2.csv", convid = function(x) gsub("_Di", "", x), standards = TRUE, tables = "preferred") 
> normalize(mix, "t1")
ExpressionSet (storageMode: lockedEnvironment)
assayData: 35 features, 42 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: STDs_1_2_1 STDs_1_2_2 ... STDs3_3_11 (42 total)
  varLabels: type experiment runorder
  varMetadata: labelDescription
featureData
  featureNames: 15 18 ... 249 (35 total)
  fvarLabels: mark tag ... preferred (7 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: readGCMS(expfile = "../../data/081228_tomato02_dilution_nv_MetMat_ABS/081228_tomato02_dilution_MetMat_abs.txt", pdatafile = "../../data/pheno2.csv", convid = function(x) gsub("_Di", "", x), standards = TRUE, tables = "preferred") 
> normalize(mix, "ri")
ExpressionSet (storageMode: lockedEnvironment)
assayData: 35 features, 42 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: STDs_1_2_1 STDs_1_2_2 ... STDs3_3_11 (42 total)
  varLabels: type experiment runorder
  varMetadata: labelDescription
featureData
  featureNames: 15 18 ... 249 (35 total)
  fvarLabels: mark tag ... preferred (7 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: readGCMS(expfile = "../../data/081228_tomato02_dilution_nv_MetMat_ABS/081228_tomato02_dilution_MetMat_abs.txt", pdatafile = "../../data/pheno2.csv", convid = function(x) gsub("_Di", "", x), standards = TRUE, tables = "preferred") 
> normalize(mix, "median")
ExpressionSet (storageMode: lockedEnvironment)
assayData: 35 features, 42 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: STDs_1_2_1 STDs_1_2_2 ... STDs3_3_11 (42 total)
  varLabels: type experiment runorder
  varMetadata: labelDescription
featureData
  featureNames: 15 18 ... 249 (35 total)
  fvarLabels: mark tag ... preferred (7 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: readGCMS(expfile = "../../data/081228_tomato02_dilution_nv_MetMat_ABS/081228_tomato02_dilution_MetMat_abs.txt", pdatafile = "../../data/pheno2.csv", convid = function(x) gsub("_Di", "", x), standards = TRUE, tables = "preferred") 
> normalize(mix, "totL2")
ExpressionSet (storageMode: lockedEnvironment)
assayData: 35 features, 42 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: STDs_1_2_1 STDs_1_2_2 ... STDs3_3_11 (42 total)
  varLabels: type experiment runorder
  varMetadata: labelDescription
featureData
  featureNames: 15 18 ... 249 (35 total)
  fvarLabels: mark tag ... preferred (7 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation: readGCMS(expfile = "../../data/081228_tomato02_dilution_nv_MetMat_ABS/081228_tomato02_dilution_MetMat_abs.txt", pdatafile = "../../data/pheno2.csv", convid = function(x) gsub("_Di", "", x), standards = TRUE, tables = "preferred") 
> ## can also do normalization with matrices
> Y <- exprs(mix)
> G <- with(pData(mix), model.matrix(~-1+type))
> isIS <- with(fData(mix), tag == "IS")
> normalize(Y, "crmn", factor=G, ncomp=3, standards=isIS)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
crmn
 --- call from context --- 
normalize(Y, "crmn", factor = G, ncomp = 3, standards = isIS)
 --- call from argument --- 
if (class(object) == "ExpressionSet") pData(object) <- dropunusedlevels(pData(object))
 --- R stacktrace ---
where 1: normalize(Y, "crmn", factor = G, ncomp = 3, standards = isIS)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (object, method, segments = NULL, ...) 
{
    if (class(object) == "ExpressionSet") 
        pData(object) <- dropunusedlevels(pData(object))
    if (is.null(segments)) {
        fit <- normFit(object, method = method, ...)
        object <- normPred(fit, object, ...)
    }
    else {
        anaobj <- analytes(object, ...)
        exprMat <- mexprs(anaobj)
        for (i in segments) {
            fit <- normFit(object[, -i], method = method, ...)
            exprMat[, i] <- mexprs(normPred(fit, object[, i], 
                ...))
        }
        mexprs(anaobj) <- exprMat
        object <- anaobj
    }
    object
}
<bytecode: 0x55d78d23dac0>
<environment: namespace:crmn>
 --- function search by body ---
Function normalize in namespace crmn has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1