Skip to content

Commit

Permalink
fix: ensure polars:: when call R pl in Rust (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Nov 10, 2023
1 parent f8d6642 commit 2472c24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rust/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ pub fn robj_to_lazyframe(robj: extendr_api::Robj) -> RResult<LazyFrame> {
Ok(lf)
}
_ if robj.inherits("data.frame") => {
let df = unpack_r_eval(R!("polars:::result(pl$DataFrame({{robj}}))"))?;
let df = unpack_r_eval(R!("polars:::result(polars::pl$DataFrame({{robj}}))"))?;
let extptr_df: ExternalPtr<DataFrame> = df.try_into()?;
Ok(extptr_df.lazy())
}
Expand Down Expand Up @@ -852,7 +852,7 @@ pub fn robj_to_dataframe(robj: extendr_api::Robj) -> RResult<DataFrame> {
Ok(extptr_df.0.clone())
}
_ if robj.inherits("data.frame") => {
let df = unpack_r_eval(R!("polars:::result(pl$DataFrame({{robj}}))"))?;
let df = unpack_r_eval(R!("polars:::result(polars::pl$DataFrame({{robj}}))"))?;
let extptr_df: ExternalPtr<DataFrame> = df.try_into()?;
Ok(extptr_df.0.clone())
}
Expand Down

0 comments on commit 2472c24

Please sign in to comment.