Skip to main content

into_list_column

Function into_list_column 

Source
#[doc(hidden)]
pub fn into_list_column<T: IntoList>(values: Vec<T>) -> SEXP
Expand description

Build an R list-column (VECSXP) from values converted one at a time through IntoList.

The column is allocated and protected first; each value’s list is stored in it as soon as it is built, so no list is ever unrooted while the next one allocates. Collecting a Vec<List> first and converting that would leave every earlier list unrooted across the later allocations (#1748).

Used by #[derive(DataFrameRow)] for #[dataframe(as_list)] struct-typed fields.