Skip to content

R v4.5.2 (and earlier) fully compatible version for x64 with up to date libraries #221

Description

@SamLovick

This is a pointer, not a bug report: there is now a build of BERT 2 that works with current R, in case it saves anyone the archaeology. It is a community fork, not an official release.

BERT 2.4.4 is tied to the R 3.5 it ships with, which is what #194, #207 and #184 are all circling. The fork builds one ControlR.exe against R 4.5.2 and gates the R version at runtime rather than compiling against a fixed 3.5, so it runs against the R you already have, from 3.5 up to 4.6 — tested against 4.6.1, 4.5.2, 4.2.2 and 3.5.0. Drawing is tied to a particular R -- BERTModule is compiled against R's graphics engine, whose version changes between R series, so a module built for one series fails R_GE_checkVersionOrDie on another -- so the install ships one module per series, six of them, and loads the one matching your R. Graphics, Excel references and everything else work across the whole range. R is no longer bundled; the installer finds your existing installation from the registry. Strings are handled as UTF-8 from end to end, so nchar("café") is 4 in a cell and in the console, and accented and non-Latin text survives the round trip between Excel, R and the shell. The build is x64 only, on the v145 toolset with protobuf 5.29, and links statically so the binaries need no Visual C++ redistributable. The console is on current Electron, Monaco and xterm.

One thing is new rather than restored: argument help for your own functions. Attach a description in R, as attr(CAGR, "description") <- c("Compound annual growth rate", "Start value", "End value", "Years"), and Excel's Insert Function and Function Arguments dialogs pick it up, while typing =R.CAGR( in a cell shows the same text in the formula bar, highlighting the argument you are on. Excel gives XLL add-ins no way to draw that inline tooltip themselves, so the add-in writes an Excel-DNA IntelliSense file and the installer offers that add-in as an optional component, off by default and re-installable later. What to put in your R code, and how the pieces fit together, is written up in docs/FUNCTION-HELP.md.

Two long-standing faults turned up while testing it, both in code that predates any of this and affects stock 2.4.4 as well. Any spreadsheet function that called back into Excel deadlocked — Excel showed "Calculating" and stopped responding, R sat idle, and neither recovered. That made the documented graphics device (bert-toolkit.com/r-graphics-in-excel) unusable, since it asks Excel which cell it was called from. The cause was a leftover Sleep(1000) that left the add-in's callback routing flag stale for a second, so R's reply — which arrives in about a millisecond — was sent through COM into an Excel that was mid-calculation. Separately, the console's pipe reader assumed every socket read held whole messages, so any reply over 64k was dropped and the request never completed; asking for completions on a workspace with a few thousand objects hung the shell. Both are fixed, with the diagnosis written up in the pull request below.

Latest build, installer and zip: https://github.com/SamLovick/Basic-Excel-R-Toolkit/releases/latest — it installs over an existing BERT 2 without touching bert-config.json, user-stylesheet.less or Documents\BERT2. It is not code-signed, so SmartScreen will warn on first run.

The whole change set is offered back to this project as #220, commit by commit, if any of it is wanted here. Issues with the fork are better raised on the fork so they don't add noise to this tracker.

Generated with the assistance of Claude Code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions