Joe Roberts: Taking CRAN to the Next Level with Posit Public Package Manager
videoimage: thumbnail.jpg
Transcript#
This transcript was generated automatically and may contain errors.
Hi, I'm Joe, I am a product manager at Posit, and I'm going to talk today about taking CRAN to the next level with Posit Public Package Manager. But first, let's talk a bit about who is Posit, because we throw this around, you hear the name, we've made a few, you know, we fund or support a few of these packages you probably have heard of.
Our mission at Posit is to create open source software for data science. And that's, you know, to make everyone in this room's lives easier. We want to make those free to the data science community, so we give them away. But we have to fund that somehow, which is through commercial products designed for teams and organizations, which is the side of the company that I work on.
What is CRAN and why it matters
But one of those that is based on that is, let's talk about CRAN. You all know and love CRAN. Whether you know it or not, you know, CRAN is the official home for over 20,000 packages. And in my earnest belief, the biggest reason ours has become so popular for data science is because of CRAN. It is because you have all these packages there that really can solve everything that you could possibly want to do and do really cool things. And installing packages just works with installed packages. But there's some better ways to do things even with CRAN.
Introducing Posit Public Package Manager
What we have, one of the products we have on Posit is what we have called a Posit Public Package Manager, or the three P's and the M, so P3M for shorthand often. And so that's a free hosted service that we provide now based on our commercial Posit Package Manager product that we sell for our enterprise customers. But most importantly for this audience, it provides everything in a complete CRAN mirror like you are already using, plus many additional features that can make it a really useful way to help you out.
It's used widely already in our community. We serve over 40 million package installs each month from Posit Public Package Manager. And here's some of the reasons that people like it.
Key features and advantages
For one thing, if you're on Windows or Mac, you probably know the power of binary packages. That's why when you install a package from CRAN, you don't have to worry about taking the time to actually compile the package and install it that way. We also provide similar binaries if you are one of those people that's working on Linux or in an environment like a Docker container that needs a Linux package. So binaries are a huge advantage from there.
Most importantly, too, CRAN itself builds binary packages for both the current version of R and the one previous version of R. We actually go four previous versions of R back because there are some reasons you still need to use older versions of R and still have that same level of ease of use, even though you're not on the latest there.
Similarly, CRAN has one view that is the latest version of every package. We actually have been since about 2018 and taking full snapshots of CRAN every day. So we actually have the whole history of CRAN for the last six plus years now. And so there are the reasons, sometimes the case, you know, you come back to a project that you started, you know, you were working on an R two years ago and go, oh, I need to rebuild this, but I don't have my machine, I'm on a new machine, I need to be able to get all this here, but the packages that have changed, maybe they've changed in a way that makes my old code not work the same.
So with using public package manager here, you can go and say, I want to, instead of installing all the current packages, I want you to install the versions of all these packages that were available two years ago when I worked on this project. So I know that that's what I use then. I can then rebuild, get things working again, and then figure out if I want to upgrade and keep going from there as well.
So with using public package manager here, you can go and say, I want to, instead of installing all the current packages, I want you to install the versions of all these packages that were available two years ago when I worked on this project.
And you can, of course, then use our UI in there to search and view package information about all these packages on CRAN. Here's a look at a typical, you know, one of those things you might find there. We actually have details, you can view, kind of drill down, search for packages, see all the more details about that, as well as, you know, the versions, and even, we actually even just have added security vulnerability checks for those who are on the security conscious side, want to make sure that the packages you're using haven't had any sort of security issues with them as well.
Getting started
Switching over to using public package manager as your CRAN repository is very simple. We try to keep it that way. It's a matter of just either changing your options, repos variable in your R session, whatever that is. If you're using our fabulous RStudio, you can just do it right in the, there's a setting in the UI. You can just plug it in there and see what you, the URL that you need there. And you can get details specifically for your environment on our setup page. You just go to our website, hit the setup button, it'll walk you through exactly everything you have to do.
And our website, of course, to make it simple to write, p3m.dev. Check it out, try it today. Drop us a note and let us know how you like it, if there's anything you like there. And thanks for your time.
