R/writeCCModel.R

Defines functions writeCCModel

Documented in writeCCModel

writeCCModel <- function(object, file)
{
    if (!is(object, "CCModel"))
        stop("object is not of class 'CCModel'")

    df <- data.frame(c("_b", "_m", "_scaling", colnames(object@weights)),
                     c(object@b, object@m, as.integer(object@scaling),
                       object@weights[1, ]))

    write.table(df, file=file, quote=FALSE, sep=",", row.names=FALSE,
                col.names=FALSE)

    invisible(NULL)
}

Try the procoil package in your browser

Any scripts or data that you put into this service are public.

procoil documentation built on Nov. 17, 2017, 11:21 a.m.