public class RList extends Object
at(String) it is possible to fetch "body" for a specific "head".
The terminology used is partly from hash fields - "keys" are the elements in "head"
and values are in "body" (see keys).
On the other hand, R uses lists to store complex internal structures, which are not parsed according to the structure - in that case "head" and "body" have to be evaluated separately according to their meaning in that context.
| Modifier and Type | Field and Description |
|---|---|
REXP |
body
xpressions containing head, body and tag.
|
REXP |
head
xpressions containing head, body and tag.
|
REXP |
tag
xpressions containing head, body and tag.
|
| Constructor and Description |
|---|
RList()
constructs an empty list
|
RList(REXP h,
REXP b)
constructs an initialized list
|
RList(REXP h,
REXP t,
REXP b)
constructs an initialized list
|
RList(RVector v)
fake constructor to keep compatibility with Rserve (for now, will be gone soon)
|
| Modifier and Type | Method and Description |
|---|---|
REXP |
at(int i)
get element at the specified position
|
REXP |
at(String v)
get xpression given a key
|
REXP |
getBody()
get body xpression (CDR)
|
REXP |
getHead()
get head xpression (CAR)
|
REXP |
getTag()
get tag xpression
|
String[] |
keys()
returns all keys of the list
|
public REXP head
public REXP body
public REXP tag
public RList()
public RList(RVector v)
public RList(REXP h, REXP b)
h - head xpressionb - body xpressionpublic REXP getHead()
public REXP getBody()
public REXP getTag()
public REXP at(String v)
v - keynull if list is not standartized or key not foundpublic REXP at(int i)
i - indexnull if list is not standartized or
if index out of boundspublic String[] keys()
null if list is not standartizedCopyright © 2017. All rights reserved.