rcx_new {ndexr}R Documentation

Create a blank rcx object

Description

This function generates a (blank) RCX object. For a valid RCX, at least one node has to be specified. Optional attributes are 'n' for names and 'r' for represents. Ids have to be unique (in nodes) and may not contain 'NA' values. For names and represents attributes, 'NA' values are allowed.

Usage

rcx_new(nodes = c(`@id` = 1))

Arguments

nodes

vector or data.frame (default: c('@id'=1) ) node(s)

Value

RCX object

Examples

rcx = rcx_new()
rcx = rcx_new(c('@id'=1))                                #same as one before
rcx = rcx_new(nodes=c('@id'=1))                          #same as one before
rcx = rcx_new(data.frame('@id'=c(1), check.names=FALSE))     #same as one before
rcx = rcx_new(c('@id'=1, n='Some Name'))
rcx = rcx_new(c('@id'=1, n='Some Name', r='HGNC:Symbol'))
#same as one before:
rcx = rcx_new(data.frame('@id'=c(1),n=c('Some Name'), r=c('HGNC:Symbol'), check.names=FALSE))
rcx = rcx_new(data.frame('@id'=c(1,2,3),n=c('Some Name','And another name',NA),
                         r=c('HGNC:Symbol',NA,'UniProt:C3P0'), check.names=FALSE))

[Package ndexr version 1.10.0 Index]