Expand description
§Common exports for extendr-api.
This allows us to be more selective about exports and avoid users using deprecated features.
Re-exports§
pub use super::CanBeNA;
pub use super::Rtype;
pub use super::FALSE;
pub use super::NA_INTEGER;
pub use super::NA_LOGICAL;
pub use super::NA_REAL;
pub use super::NA_STRING;
pub use super::NULL;
pub use super::TRUE;
pub use super::error::Error;
pub use super::error::Result;
pub use super::functions::base_env;
pub use super::functions::base_namespace;
pub use super::functions::blank_scalar_string;
pub use super::functions::blank_string;
pub use super::functions::current_env;
pub use super::functions::empty_env;
pub use super::functions::eval_string;
pub use super::functions::eval_string_with_params;
pub use super::functions::find_namespace;
pub use super::functions::find_namespaced_function;
pub use super::functions::global_env;
pub use super::functions::global_function;
pub use super::functions::na_string;
pub use super::functions::namespace_registry;
pub use super::functions::new_env;
pub use super::functions::nil_value;
pub use super::functions::parse;
pub use super::functions::srcref;
pub use super::wrapper::symbol::base_symbol;
pub use super::wrapper::symbol::brace_symbol;
pub use super::wrapper::symbol::bracket_2_symbol;
pub use super::wrapper::symbol::bracket_symbol;
pub use super::wrapper::symbol::class_symbol;
pub use super::wrapper::symbol::device_symbol;
pub use super::wrapper::symbol::dim_symbol;
pub use super::wrapper::symbol::dimnames_symbol;
pub use super::wrapper::symbol::dollar_symbol;
pub use super::wrapper::symbol::dot_defined;
pub use super::wrapper::symbol::dot_method;
pub use super::wrapper::symbol::dot_package_name;
pub use super::wrapper::symbol::dot_target;
pub use super::wrapper::symbol::dots_symbol;
pub use super::wrapper::symbol::double_colon_symbol;
pub use super::wrapper::symbol::lastvalue_symbol;
pub use super::wrapper::symbol::levels_symbol;
pub use super::wrapper::symbol::missing_arg;
pub use super::wrapper::symbol::mode_symbol;
pub use super::wrapper::symbol::na_rm_symbol;
pub use super::wrapper::symbol::name_symbol;
pub use super::wrapper::symbol::names_symbol;
pub use super::wrapper::symbol::namespace_env_symbol;
pub use super::wrapper::symbol::package_symbol;
pub use super::wrapper::symbol::previous_symbol;
pub use super::wrapper::symbol::quote_symbol;
pub use super::wrapper::symbol::row_names_symbol;
pub use super::wrapper::symbol::seeds_symbol;
pub use super::wrapper::symbol::sort_list_symbol;
pub use super::wrapper::symbol::source_symbol;
pub use super::wrapper::symbol::spec_symbol;
pub use super::wrapper::symbol::triple_colon_symbol;
pub use super::wrapper::symbol::tsp_symbol;
pub use super::wrapper::symbol::unbound_value;
pub use crate::lang;
pub use crate::lang;
pub use crate::list;
pub use super::wrapper::AltComplexImpl;
pub use super::wrapper::AltIntegerImpl;
pub use super::wrapper::AltLogicalImpl;
pub use super::wrapper::AltRawImpl;
pub use super::wrapper::AltRealImpl;
pub use super::wrapper::AltStringImpl;
pub use super::wrapper::Altrep;
pub use super::wrapper::AltrepImpl;
pub use super::wrapper::RArray;
pub use super::wrapper::RColumn;
pub use super::wrapper::RMatrix;
pub use super::wrapper::RMatrix3D;
pub use super::wrapper::AltListImpl;
pub use super::wrapper::s4::S4;
pub use super::wrapper::Conversions;
pub use super::wrapper::MatrixConversions;
pub use super::robj::AsStrIter;
pub use super::robj::Attributes;
pub use super::robj::Eval;
pub use super::robj::GetSexp;
pub use super::robj::IntoRobj;
pub use super::robj::Length;
pub use super::robj::Operators;
pub use super::robj::Rinternals;
pub use super::robj::Robj;
pub use super::robj::RobjItertools;
pub use super::robj::Slices;
pub use super::robj::Types;
pub use super::thread_safety::catch_r_error;
pub use super::thread_safety::single_threaded;
pub use super::thread_safety::throw_r_error;
pub use super::wrapper::Complexes;
pub use super::wrapper::Dataframe;
pub use super::wrapper::Doubles;
pub use super::wrapper::EnvIter;
pub use super::wrapper::Environment;
pub use super::wrapper::Expressions;
pub use super::wrapper::ExternalPtr;
pub use super::wrapper::FromList;
pub use super::wrapper::Function;
pub use super::wrapper::Integers;
pub use super::wrapper::IntoDataFrameRow;
pub use super::wrapper::Language;
pub use super::wrapper::List;
pub use super::wrapper::ListIter;
pub use super::wrapper::Logicals;
pub use super::wrapper::Nullable;
pub use super::wrapper::Pairlist;
pub use super::wrapper::Primitive;
pub use super::wrapper::Promise;
pub use super::wrapper::Raw;
pub use super::wrapper::Rstr;
pub use super::wrapper::Strings;
pub use super::wrapper::Symbol;
pub use super::iter::StrIter;
pub use super::scalar::*;
pub use super::Nullable::*;
Modules§
- col
- Column vector type.
- complex_
native - Native complex floating point types whose real and imaginary parts are stored contiguously.
- diag
- Diagonal matrix type.
- dyn_
stack - Stack that allows users to allocate dynamically sized arrays.
- io
- De-serialization from common matrix file formats.
- mat
- Matrix type.
- modules
Deprecated - Re-exports.
- perm
- Permutation matrices.
- reborrow
- Emulate reborrowing for user types.
- row
- Row vector type.
- solvers
Deprecated - Matrix solvers and decompositions.
- sparse
- Sparse data structures and algorithms. Sparse matrix data structures.
- stats
- Statistics-related utilities.
- utils
- Various utilities for low level implementations in generic code.
Macros§
- R
- Execute R code by parsing and evaluating tokens.
- Rraw
- Execute R code by parsing and evaluating tokens but without expanding parameters.
- array
- Create an
Array
with one, two or three dimensions. - assert_
matrix_ eq - Compare matrices for exact or approximate equality.
- azip
- Array zip macro: lock step function application across several arrays and producers.
- call
- Call a function or primitive defined by a text expression with arbitrary parameters. This currently works by parsing and evaluating the string in R, but will probably acquire some shortcuts for simple expressions, for example by caching symbols and constant values.
- col
- Creates a
col::Col
containing the arguments. - concat
- Concatenates the matrices in each row horizontally, then concatenates the results vertically.
- concatenate
- Concatenate arrays along the given axis.
- data_
frame - Create a dataframe.
- dbgf
- extendr_
module - Define a module and export symbols to R Example:
- factor
- Create a factor.
- for_
both - Evaluate the provided expression for both
Either::Left
andEither::Right
. - global
- Get a global variable.
- lang
- A macro for constructing R language objects.
- list
- Create a List R object from a list of name-value pairs.
- mat
- Creates a
Mat
containing the arguments. - pairlist
- Create a Pairlist R object from a list of name-value pairs.
- r
- Convert a rust expression to an R object.
- reprint
- Print via the R error stream.
- reprintln
- Print with a newline via the R output stream.
- row
- Creates a
row::Row
containing the arguments. - rprint
- Print via the R output stream.
- rprintln
- Print with a newline via the R output stream.
- s
- Slice argument constructor.
- stack
- Stack arrays along the new axis.
- stack_
new_ axis Deprecated - Stack arrays along the new axis.
- sym
- The sym! macro install symbols. You should cache your symbols in variables as generating them is costly.
- test
- Macro for running tests.
- try_
left - Macro for unwrapping the left side of an
Either
, which fails early with the opposite side. Can only be used in functions that returnEither
because of the early return ofRight
that it provides. - try_
right - Dual to
try_left!
, see its documentation for more information. - unzipped
- Used to undo the zipping by the
zipped!
macro. - var
- Get a local variable from the calling function or a global variable if no such variable exists.
- zipped
- Zips together matrix of the same size, so that coefficient-wise operations can be performed on their elements.
Structs§
- Array
Base - An n-dimensional array.
- Axis
- An axis index.
- Axis
Description - Description of the axis, its length and its stride.
- Col
- Heap allocated resizable column vector.
- ColMut
- Mutable view over a column vector, similar to a mutable reference to a strided slice.
- ColRef
- Immutable view over a column vector, similar to an immutable reference to a strided slice.
- Dim
- Dimension description.
- Iter
Either - Iterator that maps left or right iterators to corresponding
Either
-wrapped items. - IxDyn
Impl - Dynamic dimension or index type.
- Mat
- Heap allocated resizable matrix, similar to a 2D
Vec
. - MatMut
- Mutable view over a matrix, similar to a mutable reference to a 2D strided slice.
- MatRef
- Immutable view over a matrix, similar to an immutable reference to a 2D strided slice.
- Math
Cell - A transparent wrapper of
Cell<T>
which is identical in every way, except it will implement arithmetic operators as well. - NewAxis
- Token to represent a new axis in a slice description.
- Owned
ArcRepr - ArcArray’s representation.
- Owned
Repr - Array’s representation.
- RawView
Repr - Array pointer’s representation.
- Row
- Heap allocated resizable row vector.
- RowMut
- Mutable view over a row vector, similar to a mutable reference to a strided slice.
- RowRef
- Immutable view over a row vector, similar to an immutable reference to a strided slice.
- Scale
- Factor for matrix-scalar multiplication.
- Shape
- A contiguous array shape of n dimensions.
- Shape
Error - An error related to array shape or layout.
- Slice
- A slice (range with step size).
- Slice
Info - Represents all of the necessary information to perform a slice.
- Stride
Shape - An array shape of n dimensions in c-order, f-order or custom strides.
- View
Repr - Array view’s representation.
- Zip
- Lock step function application across several arrays or other producers.
Enums§
- Conj
- Whether a matrix should be implicitly conjugated when read or not.
- CowRepr
- CowArray’s representation.
- Either
- The enum
Either
with variantsLeft
andRight
is a general purpose sum type with two cases. - Error
Kind - Error code for an error related to array shape or layout.
- Fold
While - Value controlling the execution of
.fold_while
onZip
. - Order
- Array order
- Parallelism
- Parallelism strategy that can be passed to most of the routines in the library.
- Side
- Specifies whether the triangular lower or upper part of a matrix should be accessed.
- Slice
Info Elem - A slice (range with step), an index, or a new axis token.
Traits§
- AsArray
- Argument conversion into an array view
- Assign
Elem - A producer element that can be assigned to once
- Complex
Field - Unstable trait containing the operations that a number type needs to implement.
- Conjugate
- Trait for types that may be implicitly conjugated.
- Data
- Array representation trait.
- DataMut
- Array representation trait.
- Data
Owned - Array representation trait.
- Data
Shared - Array representation trait.
- DimAdd
- Adds the two dimensions at compile time.
- DimMax
- Dimension
- Array shape and index trait.
- Entity
- Unstable core trait for describing how a scalar value may be split up into individual component.
- Fixed
Initializer - Fixed-size array used for array initialization
- Index
- Trait for unsigned integers that can be indexed with.
- Index
Longer - Extra indexing methods for array views
- Into
Dimension - Argument conversion a dimension.
- Into
Either - Provides methods for converting a type
Self
into either aLeft
orRight
variant ofEither<Self, Self>
. - Into
NdProducer - Argument conversion into a producer.
- Linalg
Scalar - Elements that support linear algebra operations.
- Multi
Slice Arg - Slicing information describing multiple mutable, disjoint slices.
- NdFloat
- Floating-point element types
f32
andf64
. - NdIndex
- Tuple or fixed size arrays that can be used to index an array.
- NdProducer
- A producer of an n-dimensional set of elements; for example an array view, mutable array view or an iterator that yields chunks.
- RawData
- Array representation trait.
- RawData
Clone - Array representation trait.
- RawData
Mut - Array representation trait.
- RawData
Subst - Array representation trait.
- Real
Field - Unstable trait containing the operations that a real number type needs to implement.
- Remove
Axis - Array shape with a next smaller dimension.
- Scalar
Operand - Elements that can be used as direct operands in arithmetic with arrays.
- Shape
Arg - Array shape argument with optional order parameter
- Shape
Builder - A trait for
Shape
andD where D: Dimension
that allows customizing the memory layout (strides) of an array shape. - Signed
Index - Trait for signed integers corresponding to the ones satisfying
Index
. - Simple
Entity - Slice
Arg - A type that can slice an array of dimension
D
. - TryFrom
- Simple and safe type conversions that may fail in a controlled
way under some circumstances. It is the reciprocal of
TryInto
. - TryInto
- An attempted conversion that consumes
self
, which may or may not be expensive.
Functions§
- Dim
- Create a new dimension value.
- Ix0
- Create a zero-dimensional index
- Ix1
- Create a one-dimensional index
- Ix2
- Create a two-dimensional index
- Ix3
- Create a three-dimensional index
- Ix4
- Create a four-dimensional index
- Ix5
- Create a five-dimensional index
- Ix6
- Create a six-dimensional index
- IxDyn
- Create a dynamic-dimensional index
- arr0
- Create a zero-dimensional array with the element
x
. - arr1
- Create a one-dimensional array with elements from
xs
. - arr2
- Create a two-dimensional array with elements from
xs
. - arr3
- Create a three-dimensional array with elements from
xs
. - aview0
- Create a zero-dimensional array view borrowing
x
. - aview1
- Create a one-dimensional array view with elements borrowing
xs
. - aview2
- Create a two-dimensional array view with elements borrowing
xs
. - aview_
mut1 - Create a one-dimensional read-write array view with elements borrowing
xs
. - aview_
mut2 - Create a two-dimensional read-write array view with elements borrowing
xs
. - concatenate
- Concatenate arrays along the given axis.
- disable_
global_ parallelism - Causes functions that access global parallelism settings to panic.
- get_
global_ parallelism - Gets the global parallelism settings.
- indices
- Create an iterable of the array shape
shape
. - indices_
of - Return an iterable of the indices of the passed-in array.
- rcarr1
- Create a one-dimensional array with elements from
xs
. - rcarr2
- Create a two-dimensional array with elements from
xs
. - rcarr3
- Create a three-dimensional array with elements from
xs
. - scale
- Returns a factor for matrix-scalar multiplication.
- set_
global_ parallelism - Sets the global parallelism settings.
- stack
- Stack arrays along the new axis.
- stack_
new_ axis Deprecated - Stack arrays along the new axis.
Type Aliases§
- ArcArray
- An array where the data has shared ownership and is copy on write.
- ArcArray1
- one-dimensional shared ownership array
- ArcArray2
- two-dimensional shared ownership array
- Array
- An array that owns its data uniquely.
- Array0
- zero-dimensional array
- Array1
- one-dimensional array
- Array2
- two-dimensional array
- Array3
- three-dimensional array
- Array4
- four-dimensional array
- Array5
- five-dimensional array
- Array6
- six-dimensional array
- ArrayD
- dynamic-dimensional array
- Array
View - A read-only array view.
- Array
View0 - zero-dimensional array view
- Array
View1 - one-dimensional array view
- Array
View2 - two-dimensional array view
- Array
View3 - three-dimensional array view
- Array
View4 - four-dimensional array view
- Array
View5 - five-dimensional array view
- Array
View6 - six-dimensional array view
- Array
ViewD - dynamic-dimensional array view
- Array
View Mut - A read-write array view.
- Array
View Mut0 - zero-dimensional read-write array view
- Array
View Mut1 - one-dimensional read-write array view
- Array
View Mut2 - two-dimensional read-write array view
- Array
View Mut3 - three-dimensional read-write array view
- Array
View Mut4 - four-dimensional read-write array view
- Array
View Mut5 - five-dimensional read-write array view
- Array
View Mut6 - six-dimensional read-write array view
- Array
View MutD - dynamic-dimensional read-write array view
- CowArray
- An array with copy-on-write behavior.
- Ix
- Array index type
- Ix0
- zero-dimensionial
- Ix1
- one-dimensional
- Ix2
- two-dimensional
- Ix3
- three-dimensional
- Ix4
- four-dimensional
- Ix5
- five-dimensional
- Ix6
- six-dimensional
- IxDyn
- dynamic-dimensional
- Ixs
- Array index type (signed)
- RawArray
View - A read-only array view without a lifetime.
- RawArray
View Mut - A mutable array view without a lifetime.
Attribute Macros§
- extendr
- The
#[extendr]
-macro may be placed on three items
Derive Macros§
- Into
Data Frame Row - Enable the construction of dataframes from arrays of structures.