isUpdated {MLSeq} | R Documentation

## Checks if MLSeq object is updated/modified or not.

### Description

These functions are used to check whether the `MLSeq` object is modified and/or updated. It is possible to update classification parameters of `MLSeq` object which is returned by `classify()` function.

### Usage

    isUpdated(object)

    isUpdated(object) <- value

    isModified(object)

    isModified(object) <- value

    ## S4 method for signature 'MLSeq'
    isUpdated(object)

    ## S4 replacement method for signature 'MLSeq,logical'
    isUpdated(object) <- value

    ## S4 method for signature 'MLSeq'
    isModified(object)

    ## S4 replacement method for signature 'MLSeq,logical'
    isModified(object) <- value

### Arguments

`object` | an `MLSeq` object.
`value` | a logical. Change the state of update info.

### Value

a logical.

### Examples

    ## Not run:
    library(DESeq2)
    data(cervical)

    # a subset of cervical data with first 150 features.
    data <- cervical[c(1:150), ]

    # defining sample classes.
    class <- data.frame(condition = factor(rep(c("N","T"), c(29, 29))))

    n <- ncol(data)  # number of samples
    p <- nrow(data)  # number of features

    # number of samples for test set (30% test, 70% train).
    nTest <- ceiling(n*0.3)
    ind <- sample(n, nTest, FALSE)

    # train set
    data.train <- data[ ,-ind]
    data.train <- as.matrix(data.train + 1)
    classtr <- data.frame(condition = class[-ind, ])

    # train set in S4 class
    data.trainS4 <- DESeqDataSetFromMatrix(countData = data.train,
                       colData = classtr, formula(~ 1))

    ## Number of repeats (repeats) might change model accuracies ##
    # Classification and Regression Tree (CART) Classification
    cart <- classify(data = data.trainS4, method = "rpart",
              ref = "T", preProcessing = "deseq-vst",
              control = trainControl(method = "repeatedcv", number = 5,
                                     repeats = 3, classProbs = TRUE))

    isUpdated(cart)
    isModified(cart)

    ## End(Not run)

[Package MLSeq version 1.20.3 Index]