Skip to main content

Module borrowed

Module borrowed 

Source
Expand description

Borrowed rows β†’ R data.frame: IntoDataFrame for &[Row] and &Vec<Row>.

#[derive(DataFrameRow)] implements DataFrameRowBorrow on the row type next to DataFrameRowConvert. The generated fill walks the borrowed rows once into locals that have the companion’s own column types, then runs the same column assembly code as the owned conversion, so both produce the same frame. String and Option<String> columns are written from &str (no String is cloned); every other value is cloned once into its column.

Re-exportsΒ§

use super::BuiltDataFrame; πŸ”’
use super::DataFrame; πŸ”’
use super::DataFrameError; πŸ”’
use super::IntoDataFrame; πŸ”’
use crate::SexpExt as _; πŸ”’
use crate::list::List; πŸ”’

TraitsΒ§

DataFrameRowBorrow πŸ‘»
Borrowed rows β†’ data.frame column list, emitted by #[derive(DataFrameRow)] on the row type.
StringColumn πŸ‘»
A String column the borrowed fill writes from &str.

FunctionsΒ§

adopt_column_list πŸ”’
Root a freshly assembled column list as a BuiltDataFrame, refusing the unclassed list the column engine returns for unnamed columns.