update_gctx: Update the matrix of an existing GCTX file

Description Usage Arguments Details Value Examples

View source: R/io.R

Description

Update the matrix of an existing GCTX file

Usage

1
2
3
4
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

cmap/cmapR documentation built on Oct. 14, 2021, 12:51 a.m.