API List#

List of functions and structures#

A complete list of all functions and structures provided by rdata.

Convenience functions#

Functions that read and transform a .rds or .rda file, performing parsing and conversion with one line of code.

rdata.read_rds(file_or_path, *[, ...])

Read an RDS file, containing an R object.

rdata.read_rda(file_or_path, *[, ...])

Read an RDA or RDATA file, containing an R object.

Parse .rda format#

Functions for parsing data in the .rda format. These functions return a structure representing the contents of the file, without transforming it to more appropriate Python objects. Thus, if a different way of converting R objects to Python objects is needed, it can be done from this structure.

rdata.parser.parse_file(file_or_path, *[, ...])

Parse a R file (.rda or .rdata).

rdata.parser.parse_data(data, *[, ...])

Parse the data of a R file, received as a sequence of bytes.

Conversion of the R objects#

These objects and functions convert the parsed R objects to appropriate Python objects. The Python object corresponding to a R object is chosen to preserve most original properties, but it could change in the future, if a more fitting Python object is found.

rdata.conversion.Converter()

Interface of a class converting R objects in Python objects.

rdata.conversion.SimpleConverter([...])

Class converting R objects to Python objects.

rdata.conversion.convert(data[, ...])

Use the default converter (SimpleConverter()) to convert the data.

rdata.conversion.DEFAULT_CLASS_MAP

Auxiliary structures#

These classes are used to represent R objects which have no clear analog in Python, so that the information therein can be retrieved.

rdata.conversion.RBuiltin(name)

R builtin.

rdata.conversion.RBytecode(code, constants, ...)

R bytecode.

rdata.conversion.RFunction(environment, ...)

R function.

rdata.conversion.REnvironment(*maps[, frame])

R environment.

rdata.conversion.RExpression(elements)

R expression.

rdata.conversion.RExternalPointer(protected, tag)

R bytecode.

rdata.conversion.RLanguage(elements, attributes)

R language construct.

rdata.conversion.SrcFile(filename, ...)

Source file.

rdata.conversion.SrcFileCopy(filename, ...)

Source file with a copy of its lines.

rdata.conversion.SrcRef(first_line, ...)

Reference to a source file location.