SubsetOmicsSurv {pathwayPCA} | R Documentation

## Access and Edit Event Time or Indicator in an `OmicsSurv` Object

### Description

"Get" or "Set" the values of the `eventTime_num` or `eventObserved_lgl` slots of an object of class `OmicsSurv`.

### Usage

    getEventTime(object, ...)

    getEventTime(object) <- value

    getEvent(object, ...)

    getEvent(object) <- value

    ## S4 method for signature 'OmicsSurv'
    getEventTime(object, ...)

    ## S4 replacement method for signature 'OmicsSurv'
    getEventTime(object) <- value

    ## S4 method for signature 'OmicsSurv'
    getEvent(object, ...)

    ## S4 replacement method for signature 'OmicsSurv'
    getEvent(object) <- value

### Arguments

`object` | An object of class `OmicsSurv-class`.
`...` | Dots for additional internal arguments (currently unused).
`value` | The replacement object to be assigned to the specified slot.

### Details

These functions can be useful to set or extract the event time or death indicator from an `OmicsSurv` object. However, we recommend that users simply create a new, valid `OmicsSurv` object instead of modifying an existing one. The validity of edited objects is checked with the `ValidOmicsSurv` function.

### Value

The "get" functions return the objects in the slots specified: `getEventTime` returns the `eventTime_num` vector object and `getEvent` returns the `eventObserved_lgl` vector object. These functions can extract these values from any valid `OmicsSurv` object.

The "set" functions enable the user to edit or replace objects in the `eventTime_num` or `eventObserved_lgl` slots for any `OmicsSurv` object, provided that the new values do not violate the validity check of an `OmicsSurv` object. See "Details" for more information.

### See Also

`CreateOmics`

### Examples

      data("colonSurv_df")
      data("colon_pathwayCollection")

      colon_Omics <- CreateOmics(
        assayData_df = colonSurv_df[, -(2:3)],
        pathwayCollection_ls = colon_pathwayCollection,
        response = colonSurv_df[, 1:3],
        respType = "survival"
      )

      getEventTime(colon_Omics)
      getEvent(colon_Omics)

[Package pathwayPCA version 1.6.3 Index]