Skip to main content

Module robj

Module robj 

Source
Expand description

R object handling.

See. Writing R Extensions

Fundamental principals:

  • Any function that can break the protection mechanism is unsafe.
  • Users should be able to do almost everything without using libR_sys.
  • The interface should be friendly to R users without Rust experience.

Re-exportsยง

use std::collections::HashMap; ๐Ÿ”’
use std::iter::IntoIterator; ๐Ÿ”’
use std::ops::Range; ๐Ÿ”’
use std::ops::RangeInclusive; ๐Ÿ”’
use std::os::raw; ๐Ÿ”’
use extendr_ffi::dataptr; ๐Ÿ”’
use extendr_ffi::R_IsNA; ๐Ÿ”’
use extendr_ffi::R_NilValue; ๐Ÿ”’
use extendr_ffi::R_compute_identical; ๐Ÿ”’
use extendr_ffi::R_tryEval; ๐Ÿ”’
use extendr_ffi::Rboolean; ๐Ÿ”’
use extendr_ffi::Rcomplex; ๐Ÿ”’
use extendr_ffi::Rf_getAttrib; ๐Ÿ”’
use extendr_ffi::Rf_setAttrib; ๐Ÿ”’
use extendr_ffi::Rf_xlength; ๐Ÿ”’
use extendr_ffi::COMPLEX; ๐Ÿ”’
use extendr_ffi::INTEGER; ๐Ÿ”’
use extendr_ffi::LOGICAL; ๐Ÿ”’
use extendr_ffi::PRINTNAME; ๐Ÿ”’
use extendr_ffi::RAW; ๐Ÿ”’
use extendr_ffi::REAL; ๐Ÿ”’
use extendr_ffi::SEXPTYPE; ๐Ÿ”’
use extendr_ffi::STRING_ELT; ๐Ÿ”’
use extendr_ffi::STRING_PTR_RO; ๐Ÿ”’
use extendr_ffi::TYPEOF; ๐Ÿ”’
use extendr_ffi::XLENGTH; ๐Ÿ”’
use crate::scalar::Rbool; ๐Ÿ”’
use crate::scalar::Rfloat; ๐Ÿ”’
use crate::scalar::Rint; ๐Ÿ”’
pub use operators::Operators;
use prelude::c64; ๐Ÿ”’
use prelude::Rcplx; ๐Ÿ”’
pub use rinternals::Rinternals;
use extendr_ffi::SEXPTYPE::*; ๐Ÿ”’
use crate::*; ๐Ÿ”’
pub use iter::*;

Modulesยง

debug ๐Ÿ”’
into_robj ๐Ÿ”’
operators ๐Ÿ”’
repeat_into_robj
rinternals ๐Ÿ”’
try_from_robj ๐Ÿ”’
There are various ways an Robj may be converted into different types T.

Macrosยง

impl_complex_tvv
impl_from_as_iterator
impl_integer_tvv
impl_real_tvv
impl_str_tvv
make_typed_slice ๐Ÿ”’

Structsยง

Robj
Wrapper for an R S-expression pointer (SEXP).

Traitsยง

AsTypedSlice
Generic access to typed slices in an Robj.
Attributes
Provides access to the attributes of an R object.
Eval
GetSexp
IntoRobj
This is an extension trait to provide a convenience method into_robj().
Length
RobjItertools
Extensions to iterators for R objects including RobjItertools::collect_rarray().
Slices
ToVectorValue
ToVectorValue is a trait that allows many different types to be converted to vectors. It is used as a type parameter to collect::<Robj>().
Types

Functionsยง

fixed_size_collect
str_to_character
Returns an CHARSXP based on the provided &str.
vector_slice ๐Ÿ”’ โš 
vector_slice_mut ๐Ÿ”’ โš