rcx_new {ndexr} | R Documentation |
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.
rcx_new(nodes = c(`@id` = 1))
nodes |
vector or data.frame (default: c('@id'=1) ) node(s) |
RCX object
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))