Hugh

@hughagraham.bsky.social

Today I shipped a patch version of mirai 2.7.2 with as many changes as a full version! Lower dispatch overhead for `mirai_map()` and `everywhere()` and clearer errors + many edge case fixes. These automatically translate into wins if you use parallel purrr! mirai.r-lib.org #Rstats #Tidyverse

Minimalist Async Evaluation Framework for R

Evaluates R expressions asynchronously and in parallel, locally or distributed across networks. An official parallel cluster type for R. Built on nanonext and NNG, its non-polling, event-driven archit...

mirai.r-lib.org

We've been working to make mori better - 0.2.1 is now on CRAN! Share R objects across processes with zero copies using shared memory + ALTREP. Supports mirai and all parallel frameworks. New: `prune_shared()` cleans orphaned regions, cleaner errors. github.com/shikokuchuo/... #Rstats #Tidyverse

GitHub - shikokuchuo/mori: Shared Memory for R Objects

Shared Memory for R Objects. Contribute to shikokuchuo/mori development by creating an account on GitHub.

github.com

» arrow-extendr « now supports geoarrow 🌏 Use geoarrow types from anywhere in your 🦀 Rust-powered R packages 🐇📦 👈🏼 Centroid using geoarrow + extendr 👉🏼 called from R compared to {sf} #rust #rstats

use anyhow::bail;
use arrow_extendr::FromArrowRobj;
use extendr_api::prelude::*;
use geo_traits::{CoordTrait, PointTrait};
use geoarrow::array::{GeoArrowArrayAccessor, PointArray};

#[extendr]
fn geoarrow_centroid(x: Robj) -> anyhow::Result<Doubles> {
    let res = PointArray::from_arrow_robj(&x)?;

    let (sum_x, sum_y, n) = res.iter_values().filter_map(|xi| xi.ok()).fold(
        (0.0_f64, 0.0_f64, 0usize),
        |(sx, sy, n), v| {
            let (x, y) = v.coord().unwrap().x_y();
            (sx + x, sy + y, n + 1)
        },
    );

    if n == 0 {
        bail!("cannot compute centroid of empty array");
    }

    let res = [sum_x / n as f64, sum_y / n as f64]
        .map(Rfloat::from)
        .into_iter()
        .collect::<Doubles>();

    Ok(res)
}library(wk)
library(geoarrow)
devtools::load_all()
#> ℹ Loading extendrtest

pnts <- wk::xy(rnorm(100, -180, 180), runif(100, -90, 90))
x <- geoarrow::as_geoarrow_array(pnts)

geoarrow_centroid(x)
#> [1] -182.711392   -2.806439
sf::st_as_sfc(pnts) |> 
  sf::st_combine() |> 
  sf::st_centroid()
#> Geometry set for 1 feature 
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: -182.7114 ymin: -2.806439 xmax: -182.7114 ymax: -2.806439
#> CRS:           NA
#> POINT (-182.7114 -2.806439)

New paper in Current Biology: liana cutting accelerated canopy recovery in logged tropical forest three times faster than tree planting, at one tenth of the cost. From 24 years of the Sabah Biodiversity Experiment, Sabah, Borneo. belian.earth/news/liana-c...

Liana cutting and carbon baselines

Liana cutting accelerates tropical forest recovery 3x faster than tree planting. What this means for forest carbon baselines and Verra's new methodologies.

belian.earth

I have no problem considering consciousness in terms of LLMs, it's obvious - small robot consc., the thing is a gradation, well illustrated by Daniel Dennett and co. The problem is thinking it's all or nothing. It's not "a brain", it's powerful, not powerful enough for the illusion we fly in, yet

R version 4.6.0 "Because it was There" (source version) has been released. It should be on CRAN by now. #rstats The choice of codename is in remembrance of R Core member Tomàš Kalibera (1978-2026). Among many other things, he was a keen mountain climber.

extendr v0.9.0 is release! 🚀 (hopefully) our last until v1.0.0! Improved DX 👨🏻‍💻 𝙢𝙞𝙜𝙧𝙖𝙩𝙞𝙤𝙣 𝙜𝙪𝙞𝙙𝙚 included! - `anyhow` support out of the box - deprecates `rextendr::document()` use {devtools} only! - use std trait implementations instead of custom methods #rstats #rust extendr.rs/blog/posts/2...

extendr v0.9.0 – extendr

This is (hopefully) our last minor release before extendr v1.0.0, focused almost entirely on improved developer experience.

extendr.rs

Still a WIP but I've been building a new #rstats 📦 for cloud optimised reads of #GEDI and IceSat-2 data. It's 20 x quicker than direct download and saves 10-100s of GiB on disk. The #rust powered hdf5 parser is crazy fast - with help from the 🤖. belian-earth.github.io/spacelaser/ #rspatial #rextendr

GitHub - belian-earth/spacelaser: An R package for cloud optimised partial reading of GEDI and IceSat data.

An R package for cloud optimised partial reading of GEDI and IceSat data. - belian-earth/spacelaser

github.com

I've tried many workflow automation tools and nothing beats the #rstats package {targets}. It's pure R, simple (while being feature-rich, great support for parallel execution and multi-lingual workflows, this is calling Python+DuckDB). It *trounces* the likes of make/dagster 4me. Check it out!

Bild

📣 arrow-extendr now supports polars! 🐻‍❄️ Use {duckdb} + {polars} + {arrow} + DataFusion all from extendr with a handful of lines of Rust 🦀 #rust #rstats

BildBildBild