pub struct RIntegration { /* private fields */ }Expand description
R integration utilities
Implementations§
Source§impl RIntegration
impl RIntegration
Sourcepub fn array_to_r_vector(&self, data: &[f64]) -> RValue
pub fn array_to_r_vector(&self, data: &[f64]) -> RValue
Convert Rust array to R vector
Sourcepub fn matrix_to_r_matrix(
&self,
data: &[f64],
nrows: usize,
ncols: usize,
) -> RValue
pub fn matrix_to_r_matrix( &self, data: &[f64], nrows: usize, ncols: usize, ) -> RValue
Convert Rust matrix to R matrix
Sourcepub fn r_vector_to_array(&self, r_value: &RValue) -> Result<Vec<f64>, RError>
pub fn r_vector_to_array(&self, r_value: &RValue) -> Result<Vec<f64>, RError>
Convert R value to Rust array
Sourcepub fn create_dataframe(
&self,
columns: HashMap<String, RValue>,
) -> Result<RDataFrame, RError>
pub fn create_dataframe( &self, columns: HashMap<String, RValue>, ) -> Result<RDataFrame, RError>
Create R data frame from columns
Sourcepub fn call_r_function(
&mut self,
function_name: &str,
args: &[RValue],
) -> Result<RValue, RError>
pub fn call_r_function( &mut self, function_name: &str, args: &[RValue], ) -> Result<RValue, RError>
Execute R statistical function
Sourcepub fn get_loaded_packages(&self) -> &[String]
pub fn get_loaded_packages(&self) -> &[String]
Get loaded packages
Sourcepub fn is_package_available(
&mut self,
package_name: &str,
) -> Result<bool, RError>
pub fn is_package_available( &mut self, package_name: &str, ) -> Result<bool, RError>
Check if package is available
Sourcepub fn save_variable(&mut self, name: &str, value: RValue)
pub fn save_variable(&mut self, name: &str, value: RValue)
Save workspace variable
Sourcepub fn get_variable(&self, name: &str) -> Option<&RValue>
pub fn get_variable(&self, name: &str) -> Option<&RValue>
Get workspace variable
Sourcepub fn clear_workspace(&mut self)
pub fn clear_workspace(&mut self)
Clear workspace
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RIntegration
impl RefUnwindSafe for RIntegration
impl Send for RIntegration
impl Sync for RIntegration
impl Unpin for RIntegration
impl UnwindSafe for RIntegration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more