update.gctx {cmapR} | R Documentation

## Update the matrix of an existing GCTX file

### Description

Update the matrix of an existing GCTX file

### Usage

    ## S3 method for class 'gctx'
    update(...)

    update_gctx(x, ofile, rid = NULL, cid = NULL)

### Arguments

`...` | arguments passed on to `update_gctx`
`x` | an array of data
`ofile` | the filename of the GCTX to update
`rid` | integer indices or character ids of the rows to update
`cid` | integer indices or character ids of the columns to update

### Details

Overwrite the rows and columns of `ofile` as indicated by `rid` and `cid` respectively. `rid` and `cid` can either be integer indices or character ids corresponding to the row and column ids in `ofile`.

### Value

silently returns NULL

### Examples

    ## Not run:
    m <- matrix(rnorm(20), nrow=10)
    # update by integer indices
    update_gctx(m, ofile="my.gctx", rid=1:10, cid=1:2)
    # update by character ids
    row_ids <- letters[1:10]
    col_ids <- LETTERS[1:2]
    update_gctx(m, ofile="my.gctx", rid=row_ids, cid=col_ids)

    ## End(Not run)

[Package cmapR version 1.2.1 Index]