 In our very basic introduction to R and setting up, there's one more thing I want to mention that makes working with R really amazing. And that's the packages that you can download install. Basically, you can think of them as giving you superpowers when you're doing your analysis, because you can basically do anything with the packages that are available. Specifically, packages are bundles of code. So it's more software that adds new function to R makes it so it can do new things. Now there are two kinds of package to general categories. There are base packages. These are packages that are installed with R. So they're already there, but they're not loaded by default. That way, R doesn't use maybe as much memories that might otherwise. But more significant than that are the contributed or third party packages. These are packages that need to be downloaded, installed and then loaded separately. And when you get those, it makes things extraordinary. And so you may ask yourself, where to get these marvelous packages that make things so super duper? Well, you have a few choices. Number one, you can go to Cran, that's the comprehensive R archive network. That's an official R site that has things listed with the official documentation. Two, you can go to a site called crantastic, which really is just a way of listing these things. And when you click on the links, it redirects you back to CRAN. And then third, you can also get our packages from GitHub, which is an entirely different process. If you're familiar with GitHub, it's not a big deal. Otherwise, you don't usually need to deal with it. But let's start with this first one, the comprehensive R archive network or CRAN. Now, we saw this previously, when we were just downloading our this time, we're going to cran dot r dash project dot org. And we're specifically looking for this one, the CRAN packages. That's going to be right here on the left, click on packages. And when you open that, you're going to have an interesting option. And that's to go to task views. And that breaks it down by topic. So we have your packages that deal with Bayesian inference packages that deal with chemometrics and computational physics, so on and so forth. If you click on any one of those, it'll give you a short description of the packages that are available and what they're designed to do. Now, another place to get packages, I said, is crantastic at crantastic.org. And this is one that lists the most recently updated, the most popular packages. And it's a nice way of getting some sort of information about what people use most frequently, although it does redirect you back to crant to do the actual downloading. And then finally, at GitHub.com, if you go to slash trending slash r, you'll see the most common or most frequently downloaded packages on GitHub for use in R. Now, regardless of how you get it, let me show you the ones that I use most often. And I find these make working with R really a lot more effective and a lot easier. Now they have kind of cryptic names. The first one is de plier, which is for manipulating data frames, then there's tidier for cleaning up information, stringer for working with strings or text information, lubricate for manipulating date information, HTT are for working with website data, ggv is where the gg stands for a grammar of graphics, this is for interactive visualizations. gg plot two is probably the most common package for creating graphics or data visualizations in R. shiny is another one that allows you to create interactive applications that you can install on websites. Rio is for our input output is for importing and exporting data. And then our markdown allows you to create what are called interactive notebooks or rich documents for sharing your information. Now, there are others, but there's one in particular that things useful, I call it the one package to load them all. And it's Pacman, which not surprisingly stands for package manager. And I'm going to demonstrate all of these in another course that we have here. But let me show you very quickly how to get them working. You just try it in R. If you open up this file from the course files, let me show you what it looks like. What we have here in our studio is the file for this particular video. And I say that I use Pacman, if you don't have it installed already, then run this one installation line. This is the standard installation command in R. And they'll add Pacman, and then it will show up here and packages. Now, I already have it installed. And so you can see it right there. But it's not currently loaded. See, because installing means making it available on your hard drive, but loading means actually making it accessible to your current routines. So then I need to load it or import it. And I can do it with one of two ways. I can use the require, which gives a confirmation message, I can do it like this. And you see it's got that little sentence there, or I can do library, which simply loads it without saying anything. You can see now, by the way, that it's checked off. So we know it's there. Now, if you have Pacman installed, even if it's not loaded, then you can actually use Pacman to install other packages. So what I actually do is because I have Pacman installed, I just go straight to this one, you do Pacman, and then the two colons, it says, use this command, even though this package isn't loaded. And then I load an entire collection, all the things that I showed you starting with Pacman itself. So now I'm going to run this command. And what's nice about Pacman is, if you don't have the package, it will actually install it, make it available and load it. And I got to say, this is a much easier way to do it than the standard R routine. And then for base packages, that means the ones that come with R natively, like the data sets package, you still want to do it this way, you load and unload them separately. So now I've got that one available. And then I can do the work that I want to do. Now, I'm actually not going to do it right now, because I'm going to show it to you in future videos. But now I have a whole collection of packages available, they're going to give me a lot more functionality and make my work more effective. I'm going to finish by simply unloading what I have here. Now, if you want to, with Pacman, you can unload specific packages, or the easiest way to do P underscore unload all. And what that does is it unloads all of the add on or contributed third party packages. And you can see I've got the full list there of what it's unloaded. However, for the base packages like data sets, you need to use the standard R command detach, which I'll use right here. And then I'll clear my console. And that's a very quick run through of how packages can be found online, installed into our and loaded to make your code more available. And I'll demonstrate how those work. And basically every video from here on out. So you'll be able to see how to exploit their functionality to make your work a lot faster and a lot easier.