Struct roxido::r::Rval[][src]

#[repr(C)]
pub struct Rval(pub SEXP);
Expand description

A Rust representation of an R object.

Technically, this is simply a Rust new type idiom (newtype) for R’s SEXP, a pointer to R’s SEXPREC structure.

Tuple Fields

0: SEXP

Implementations

Define a new vector with storage mode double.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Define a new vector with storage mode integer.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Define a new vector with storage mode logical.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Define a new vector with storage mode character.

Define a new vector with storage mode raw.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Define a new matrix with storage mode double.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Define a new matrix with storage mode integer.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Define a new matrix with storage mode logical.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Define a new matrix with storage mode character.

Define a new list.

Define a new error.

This does not throw an error. Instead, simply use panic!.

Define a new element for a character vector.

An element of a character vector should generally not be returned to a user, but this function can be used in conjunction with Self::set_character_element.

Define a new symbol.

Duplicate an object.

When assignments are done in R such as

Since multiple symbols may be bound to the same object, if the usual R semantics are to apply, any code which alters one of them needs to make a copy before modifying the copy. This method is commonly called on arguments to .Call before modifying them.

Get the value NULL.

Get R’s definition of the Inf value.

Get R’s definition of the -Inf value.

Get R’s definition of the NaN value.

Get R’s definition of the NA value of storage mode double.

Get R’s definition of the NA value of storage mode integer.

Get R’s definition of the NA value of storage mode logical.

Get R’s definition of the NA value for an element of an object of storage mode character.

Test if value is finite.

Test if value is NaN.

Test if value is NA for storage mode double.

Test if value is NA for storage mode integer.

Test if value is NA for storage mode logical.

Test if value is NA for an element of an object of storage mode character.

Is the object of storage mode double?

Is the object of storage mode integer?

Is the object of storage mode double or integer?

Is the object of storage mode double or integer and of length one?

Is the object of storage mode logical?

Is the object of storage mode raw?

Is the object a symbol?

Is the object an element of an object of storage mode character?

Is the object of storage mode character?

Is the object a list?

Is the object an atomic vector?

Is the object a vector?

Is the object of length one?

Is the object a matrix?

Is the object a square matrix?

Is the object an array?

Is the object a data.frame?

Is the object NULL?

Is the object a function?

Is the object an environment?

Can the object be interpreted as TRUE?

Can the object be interpreted as FALSE?

Get an element of a character vector, with indexing starting at zero.

Panics

This function panics if the object is not a character vector or if i is greater than or equal to the length of the vector.

Set an element of a character vector, with indexing starting at zero.

Panics

This function panics if the object is not a character vector or if i is greater than or equal to the length of the vector.

Get an element of a list, with indexing starting at zero.

Panics

This function panics if the object is not a list or if i is greater than or equal to the length of the list.

Set an element of a list, with indexing starting at zero.

Panics

This function panics if the object is not a list or if i is greater than or equal to the length of the list.

Get an attribute.

Set an attribute.

Create a new binding (or changes the value of an existing binding) in the specified environment frame. It is the analogue of assign(self, value, envir = environment, inherits = FALSE).

Panics

The function panics if the object is not a symbol.

Search for an existing binding in the specified environment or its enclosing environments. If a binding is found, its value is changed to value. Otherwise, a new binding is created in the global environment. This corresponds to assign(self, value, envir = environment, inherits = TRUE).

Panics

The function panics if the object is not a symbol.

Set the names attribute of an object.

Panics

The function panics if names is not an vector object of the same length as the object.

Set the class attribute of an object.

Panics

The function panics if value is not a character vector.

Get the length of the object.

Is the length of the object zero?

Coerce the object to an f64 value (potentially leading to an NA/NaN value).

Coerce the object to an i32 value (potentially leading to an NA/NaN value).

Coerce the object to a bool value (potentially leading to an NA/NaN value).

Coerce the object to a usize value (potentially leading to an NA/NaN value), setting negative values to zero.

Coerce the object to storage mode character and get the associated String value.

If coercion is not possible (because, for example, no UTF-8 representation exists), "" is returned.

Get the number of rows in a matrix.

Panics

The function panics if the object is not a matrix.

Get the number of columns in a matrix.

Panics

The function panics if the object is not a matrix.

Transpose a matrix.

Panics

The function panics if the object is not a matrix.

Get an f64 slice associated with the object, or an error if the object is not of storage mode double.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Get an i32 slice associated with the object, or an error if the object is not of storage mode integer.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Get an i32 slice (of logical values) associated with the object, or an error if the object is not of storage mode logical.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Get an u8 slice associated with the object, or an error if the object is not of storage mode raw.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Coerce the object to storage mode double and get the associated slice, or return an error if not possible.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Coerce the object to storage mode integer and get the associated slice, or return an error if not possible.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Coerce the object to storage mode logical and get the associated slice, or return an error if not possible.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Coerce the object to storage mode raw and get the associated slice, or return an error if not possible.

Although the stated lifetime is 'static, the reference is actually only valid as long as the associated R object exists.

Coerce the object to storage mode character, or return an error if not possible.

Call a function with no arguments.

Safety

This function will cause a long jump (leading to a memory leak) if the R function throws any errors. Using Self::call0 is the safe alternative, with slightly more overhead.

Call a function with one argument.

Safety

This function will cause a long jump (leading to a memory leak) if the R function throws any errors. Using Self::call1 is the safe alternative, with slightly more overhead.

Call a function with two arguments.

Safety

This function will cause a long jump (leading to a memory leak) if the R function throws any errors. Using Self::call2 is the safe alternative, with slightly more overhead.

Call a function with three arguments.

Safety

This function will cause a long jump (leading to a memory leak) if the R function throws any errors. Using Self::call3 is the safe alternative, with slightly more overhead.

Call a function with four arguments.

Safety

This function will cause a long jump (leading to a memory leak) if the R function throws any errors. Using Self::call4 is the safe alternative, with slightly more overhead.

Call a function with five arguments.

Safety

This function will cause a long jump (leading to a memory leak) if the R function throws any errors. Using Self::call5 is the safe alternative, with slightly more overhead.

Evaluation a expression, returning the value or an error code.

Call a function with no arguments, returning the value or an error code.

Call a function with one argument, returning the value or an error code.

Call a function with two arguments, returning the value or an error code.

Call a function with three arguments, returning the value or an error code.

Call a function with four arguments, returning the value or an error code.

Call a function with five arguments, returning the value or an error code.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.