INNER CODE UNIT · Python
parse
rpy2/rpy2 · rpy2-rinterface/src/rpy2/rinterface/__init__.py:119
def parse(text: str, num: int = -1):
"""Parse a string as R code.
:param text: A string with R code to parse.
:param num: The maximum number of lines to parse. If -1, no
limit is applied.
"""
if not isinstance(text, str):
raise TypeError('text must be a string.')
robj = StrSexpVector([text])
with memorymanagement.rmemory() as rmemory:
res = _rinterface._parse(robj.__sexp__._cdata, num, rmemory)
return res
def evalr_expr(
expr: 'ExprSexpVector',