frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Rv, a Package Manager for R

https://github.com/A2-ai/rv
76•Keats•1y ago
We have been building a package manager for R inspired by Cargo in Rust. The main idea behind rv is to be explicit about the R version in use as well as declaring which dependencies are used in a rproject.toml file for a given project. There's no renv::snapshot equivalent, everything needs to be declared up front, the config file (and resulting lockfile) is the source of truth. This avoids issue where renv might miss information about the installation and is also easy to tweak some packages, eg install one from source and install suggests from another.

If you have used Cargo/npm/any Python package manager/etc, it will be very familiar.

Comments

mbeavitt•1y ago
Can this be used to effectively create R environments? I’m desperate for such a solution.
goosedragons•1y ago
You can do that with Nix or Guix.
scrappyjoe•1y ago
Doesn’t renv do that? What need does renv not meet for you?
arbutus8•1y ago
Ultimately, you're right that `rv` and `renv` get you to the same spot, both create reproducible, isolated projects. `renv` has a few issues that we often hit that lead to `rv`.

`renv` is an iterative process of installing some packages, then snapshotting your project state, and then trying to reproduce. The time between the installation and snapshot can often lose information (think `install.packages("my_pkg", repos = "https://my-repo.com")`, your repo source is lost by time the snapshot occurs). You can also install incompatible versions over-time.

rv solves both of these problems because it will lock the source at the time of installation. Additionally, because it is declarative, we are able to resolve the full dependency tree before installing packages to ensure everything will be compatible.

While I am a big proponent of using rv, if renv fits your needs, then switching to rv may not be worth it. For our organization, we did have multiple issues with renv, so created a replacement for it that we hope others in the community will find useful to address their needs.

aquafox•1y ago
I had similar issues in the past. Setting up renv, everything seems good, but after working in a project for a few weeks and installing packages, renv constantly complains about the library being out-of-sync and resolving these complaints took way longer than new ones came around. I think renv has good intentions, but there are just too many edge cases (Bioconductor, installing an experimental package from Github, weird package dependencies etc.), that it always failed me in a real-world scenario.
Keats•1y ago
By default, rv will create a library folder in the same folder as your rproject.toml and there's rv activate/deactivate to add it to your loaded libs. Pretty much the same stuff as a virtualenv in Python.
okanat•1y ago
I used pixi for that. It uses Conda ecosystem but you get proper lockfiles and great native binary package support.
pupperino•1y ago
{renv} is pretty solid, I've been using it in production for years now and have no complaints.
simpaticoder•1y ago
You might want to consider writing a plugin for R with Mise en Place https://mise.jdx.dev/core-tools.html This would extend your reach and might take some of the heavy lifting out of the project. (At least for the runtime portion. I don't think it will help with package management.)
Keats•1y ago
I could be wrong but I feel like the overlap between mise and R users is likely very tiny
0cf8612b2e1e•1y ago
Tend to agree. Majority of users are leaving that icky computer stuff to RStudio and have no idea what happens behind the scenes.
simpaticoder•1y ago
Mise is pretty new, and it's userbase is tiny (afaik), so the overlap with it and anything is tiny. But I've enjoyed it as a replacement for ruby/node/java/python version managers, and I think it's a solid, thoughtful piece of kit. I think it targets curious, multilingual hackers who I imagine would be the kind of people to try out R to "kick the tires" just for fun (I imagine Elixer, Erlang, and Zig are in there for the same reason...surprised not to see Julia). It's also the case that mise is already doing all the heavy lifting of documentation, website, installation, etc so might as well not reinvent the wheel (such projects always have far more scope than you think, in my experience!) It could free you to making the package manager that much better (a very hard problem in itself).

I'm not affiliated, btw, just a happy user. Shout out to DHH for introducing it (to me) as part of Omakub.

_Wintermute•1y ago
My biggest issue with R package management is version pinning. If I specify an older version of a package, R will fetch the latest versions of all its dependencies, regardless if they're compatible or not, which leads to manually chasing down and re-installing specific versions of dependencies and sub-dependencies one-by-one.

Microsoft's CRAN time machine helped solved this, but I think they've recently shut it down and I don't really trust Posit to not have a version behind a paywall.

arbutus8•1y ago
You're hitting one of my (and many people's) main issue with the R package distribution system. In CRAN, only one package version is available at a time, which makes things like version pinning quite difficult. Now the benefit of that is that CRAN guarantees all packages will work together at any moment in time, but then trying to reach back into the Archive breaks that guarantee.

What the CRAN time machine (and now Posit Package Manager) does is take that compatibility guarantee, and freeze it so you have access to all the same, compatible, packages at any moment in time.

While I personally do use PPM fairly extensively, I do understand the paywall concern for long-term reproducibility so `rv` can help you here, with a bit of manual massaging. I'd recommend setting the repositories section of the config file to be a snapshot date in PPM that contains the package version(s) you're interested in and then installing using that repository (taking the benefit of that CRAN guarantee), then in both the config file and `rv.lock`, replace all the references to the PPM repo with your preferred CRAN mirror. This will allow you to resolve to compatible package versions, but then for your POSIT concern, will still be able to reproduce using the CRAN archive.

t-kalinowski•1y ago
Posit offers something similar to Microsoft’s CRAN Time Machine, but it works not only for CRAN, but also for Bioconductor and PyPI. You can add a date to the Public Posit Package Manager URL to access a snapshot of all packages from that day.

For example: https://packagemanager.posit.co/cran/2025-03-02

You can browse available snapshot dates here: https://packagemanager.posit.co/client/#/repos/cran/setup?sn...

This also works for PyPI and Python packages: https://packagemanager.posit.co/pypi/2025-03-04/simple

xvilka•1y ago
Maybe some code could be shared with the `uv`[1] to avoid re-implementing same things.

[1] https://github.com/astral-sh/uv

Keats•1y ago
We actually do use a bit of their code for the linking phase, which they seem to have taken from Cargo. For the rest, Python and R are way too different in how they handle packages to allow sharing code.
xgstation•1y ago
is using Rust to rewrite existing package managers a new trendy thing

feels we eagerly need cv -> C/C++ package manager

barslmn•1y ago
Can it be used for installing from bioconductor?
Keats•1y ago
Not yet but it is on the radar.
cluckindan•1y ago
Is it possible to override transitive dependencies?
Keats•1y ago
Yes, if you list it in the rproject.toml from a specific repo/url/git etc it will use that
badmonster•1y ago
I'm curious — does rv support or plan to support per-project isolation of system-level dependencies (e.g., gfortran, libxml2, etc.) like what renv sometimes indirectly requires users to manage outside R? If not, do you have recommendations for managing these in a reproducible way alongside rv?
mauflows•1y ago
I'm curious how your team ended up doing this. We settled on Nix with flakes after some pain with Docker / RStudio Server.
Keats•1y ago
It's not planned for rv, this is whole other can of worms. Something like nix/docker should work but I'm not working on that part myself so I can't comment.
condwanaland•1y ago
Very cool! Are you planning for there to be a corresponding R package that exposes the high level commands? The popularity of the usethis package really showed the power of keeping people within the R interpreter rather than going back and forth with the terminal. This is so important for a language like R that has so many users without much CS training
arbutus8•1y ago
Yes! Absolutely in the plans to have a corresponding R package. In the meantime, we've created a `.rv` R environment within rv projects that allow users to call things like `.rv$sync()` and `.rv$add("pkg")` from the console. Our internal user bases is primarily not CS based and have found these functions extremely helpful
rorylawless•1y ago
Ok, this is really promising. I've always found renv to be slightly frustrating to use and it ends up breaking in mysterious ways after a time. rv was a joy to use in a small personal repo.
j_bum•1y ago
Looks interesting, I’m excited to give it a try.

Is there any plan to have it create a manifest (like renv.lock) that can be used directly with the posit publishing system?

arbutus8•1y ago
Yes, that's a feature we are considering adding
almostkindatech•1y ago
Might be worth looking at groundhog, if you want a 'time machine' less likely to have a commercial motive

Google's Open Agentic Orchestrator

https://agentexecutor.io/
2•rochansinha•1m ago•1 comments

Let me Jev that for you

https://ljtfy.dev
2•rbaudibert•1m ago•0 comments

Conquering Entropy: Reducing Risk

https://kaeruct.github.io/posts/2026/09/19/conquering-entropy-reducing-risk/
2•kaeruct•3m ago•0 comments

Vibecoded Game with Love

https://martino.im/Dungeotto
2•martinopiaggi•4m ago•0 comments

The Patriots' kicker scoreboard trick debunked

https://perthirtysix.com/essay/patriots-scoreboard-kicker-trick
2•potench•4m ago•0 comments

The senior engineer death spiral

https://sunilpai.dev/posts/the-senior-engineer-death-spiral/
2•nsavage•5m ago•0 comments

Our mission: Teaching language to learners who happen to not be human

https://www.theycantalk.org/home
2•bookofjoe•6m ago•0 comments

Procedural islands from fractal rock and 150k raindrops

https://ilands.ai/content/359897434698027008
2•yoichi_rig•8m ago•0 comments

Hair test proves Thomas Jefferson fathered children with slave, book claims

https://www.telegraph.co.uk/us/news/2026/09/19/thomas-jefferson-father-children-slave-sally-hemin...
2•Tomte•11m ago•0 comments

What if my Git host were a static site generator?

https://char.lt/blog/2026/09/sorcery-repo-viewer/
2•homarp•12m ago•0 comments

Scientists revive 100M-year-old microbes from deep under seafloor (2020)

https://www.reuters.com/article/world/scientists-revive-100-million-year-old-microbes-from-deep-u...
2•thunderbong•12m ago•0 comments

What I Remember

https://stevenwaterman.uk/what-i-remember/
2•StevenWaterman•12m ago•0 comments

Crawl Cosplay Trunk Tournament

https://www.crawlcosplay.org/cctt
2•Bluestein•15m ago•0 comments

Any2nix: Serialization-Powered Nix Converter

https://github.com/gbr-ufs/any2nix
2•gs-101•17m ago•1 comments

System Design in Depth – 200 topics, 118 diagrams, interactive demos

https://system-design-in-depth.pages.dev
4•innovatorved•19m ago•0 comments

Show HN: A minimal Pareto-optimal OpenRouter model router for pi, based on Jev

https://github.com/philippdubach/pi-jev-router
2•7777777phil•21m ago•0 comments

IBM Buys Hughs Research Lab for Quantum Dev

https://newsroom.ibm.com/2026-07-23-ibm-to-acquire-hrl-laboratories-to-power-the-future-of-quantum
3•jimbobbam•29m ago•1 comments

From 10-97% SoC in 9 minutes: Sunwoda joins the flash charging race

https://electrek.co/2026/09/20/from-10-97-soc-in-9-minutes-sunwoda-joins-the-flash-charging-race/
3•cisc•33m ago•0 comments

Laya MLX

https://github.com/mizorewww/laya-mlx
2•blueaquilae•33m ago•1 comments

With Adapted Sailing, the Sea Is for Everyone

https://reasonstobecheerful.world/adapted-sailing-school/
3•bookofjoe•35m ago•0 comments

Sherrod Brown Tries a New Retort to Criticism on Transgender Issues

https://www.nytimes.com/2026/09/19/us/politics/sherrod-brown-transgender-ad.html
2•whack•35m ago•0 comments

No More Code Dumps

https://www.reddit.com/r/rust/comments/1wkmzun/no_more_code_dumps/
3•mellosouls•37m ago•0 comments

Lawsuit: Anthropic, OpenAI, SpaceXAI and Google made illegal slowdown agreement

https://www.pbs.org/newshour/nation/lawsuit-says-anthropic-openai-spacexai-and-google-made-illega...
2•rdmuser•37m ago•0 comments

Mathematical Billiards (2024)

https://structures.uni-heidelberg.de/blog/posts/2024_01_costa/index.php
2•vismit2000•39m ago•0 comments

Cognition and consciousness arise from analog computations, says new theory

https://www.technology.org/2026/09/19/cognition-and-consciousness-arise-from-analog-computations-...
2•hackandthink•40m ago•1 comments

A Brief History of Koinometry

https://benjaminschneider.ch/2026/09/19/koinometry.html
2•bschne•41m ago•0 comments

OpenPrinter Teaser Update [video]

https://www.youtube.com/watch?v=wSV5XT4sl2A
2•rhmn_mdov•42m ago•0 comments

Winamp will be reborn in 2027 to take on streaming

https://www.engadget.com/2259236/winamp-coming-back-2027-deezer-partnership-streaming-music/
3•NordStreamYacht•44m ago•2 comments

Yes They Want to Kill Us: The Worshippers of Machines versus Human Beings

https://www.meditationsinanemergency.com/the-worshippers-of-machines-versus-the-lovers-of-nature/
3•eustoria•45m ago•0 comments

Show HN: Easymacros – free calorie and macro tracker, no ads, no subscription

https://easymacros.fit
3•hussein987•45m ago•1 comments