пожалуйста, возвращайтесь позднее
пожалуйста, возвращайтесь позднее
So this lecture is about installing R Packages. When you download R from the comprehensive R Archive Network CRAN, you get the base R system. And this includes a bunch of functions that you can use to summarize data and make plots and things like that. It basically covers the basic function, functionality that you'll need including implementing the R language. But the real reason R is so useful is that there are a lot of add-on packages that extend this basic functionality in a bunch of different directions. Everything from cleaning data, to plotting data, to analyzing data and making interactive applications. So, R Packages are developed and published by the larger R community, hopefully including you at the end of this course. So, to obtain R Packages the primary place that you're going to go is CRAN. But for some biological applications, and some big data applications, you might also go to the Bioconductor Project that I have linked to both the websites here. You can also obtain information about the available packages on CRAN with the available packages function. And so what you would do is you can enter R, start up, and you'll get a prompt and you can type this command: a. And then give it the available packages argument just like this. And that will be a large number of packages. So you could just hit a after you hit that you could just type a and hit return and you would see all the packages, but there would be thousands. So instead you can use the head command to look at say a certain number, say just three of those, packages so these are the first three in alphabetical order. As of the making of this lecture there are approximately 5200 packages on CRAN covering a wide range of topics. An equally large number available on Bioconductor. One thing that you can do is if you know the area that you're working in, but you don't know the R package you're after, you can go to the Task Views link which groups together many R packages that are related to a specific topic. So to install an R Package you primarily use the function install.packages. So what you would, you could do is just use that with the package name as the argument. So for example if I want to install the Slidify package what I would do is I would just type install.packages and then in quotes, slidify. And what that would do is that would go to CRAN and it would install that package on your computer. Any package on which that package depends will also be downloaded and installed. This is actually one of the nicest parts about R, is that it's relatively straightforward to install new packages. You can also install multiple R packages with a single line, so what you do is you again, you type, install.packages. And now what you do is you enclose in parentheses, with a C out front. All the different package names separated by commas, and surrounded by parenth, or surrounded by quotes. And then what that would do is install the slidify, ggplot2, and devtools packages. You can also install packages relatively straightforward procedure in RStudio, so hopefully you've installed R in RStudio. You can go up to the Tools Menu and then just go down to Install Packages, and that will open up a folder that will allow you to pick the repository and then pick the package that you want to be able to install from, and it will install that package for you. Installing packages from Bioconductor is a little bit different. You don't use install.package, but it's still quite since, straightforward.