It is already explained that how you can download R and R Studio in your system and you all know the importance of R programming in Data Science.But when you download R from the Comprehensive R Archive Network (CRAN) you get a base R system.That means what you have downloaded in your system has limitations.It will perform all the basic things, that is it will implement the R language, but for using the R for Data Science purpose you have to be familiar with R packages and Tools.You need to install the tools and package in order to extend the functionality of R.
Packages and tools are the biggest advantages of R programming as it has the large collection of the packages which was developed and published by R Community.You all get all the packages at CRAN as it is the primary location for obtaining R package.There are more than 5200 packages on CRAN covering a wide range.
There are also some packages which come with base R when you download and install.To check the information about available package just give in command available.packages() in the command line.However, there are so many packages that it's not possible to see all and you have to give the command head(rownames(a),3) which will show the first three package.
x<-available.packages() #all available package is assigned to x
head(rownames(x),3) #shows the first three package
Type the above command in R Studio and it will display the first three package.
"<-" is the assignment operator in R and is used to assign the values to the variable.Same way head() which is used to display the values of the top and rownames() which return the name of the row is also a function.Similarly tail() used to display the value from the back and colnames() returns the name of the columns.
install.packages("slidify") #install the slidify package from CRAN in your system
You can also install multiple packages at the same time.
install.packages(c("slidify","ggplot2","devtools")) #Install all the three named packege
c() is a character vector in which all the names of the packages to be installed is given.
You can also directly install the packages by just going to the tools in R Studio and then select install packages.Then select the source from where you want to install the package and the package name and destination where you want to install that package in your local system.
library(slidify) #load the slidify package
Packages and tools are the biggest advantages of R programming as it has the large collection of the packages which was developed and published by R Community.You all get all the packages at CRAN as it is the primary location for obtaining R package.There are more than 5200 packages on CRAN covering a wide range.
There are also some packages which come with base R when you download and install.To check the information about available package just give in command available.packages() in the command line.However, there are so many packages that it's not possible to see all and you have to give the command head(rownames(a),3) which will show the first three package.
x<-available.packages() #all available package is assigned to x
head(rownames(x),3) #shows the first three package
Type the above command in R Studio and it will display the first three package.
"<-" is the assignment operator in R and is used to assign the values to the variable.Same way head() which is used to display the values of the top and rownames() which return the name of the row is also a function.Similarly tail() used to display the value from the back and colnames() returns the name of the columns.
Installing R Packages
Packages can be installed by using the command install.packages("package name").install.packages("slidify") #install the slidify package from CRAN in your system
You can also install multiple packages at the same time.
install.packages(c("slidify","ggplot2","devtools")) #Install all the three named packege
c() is a character vector in which all the names of the packages to be installed is given.
You can also directly install the packages by just going to the tools in R Studio and then select install packages.Then select the source from where you want to install the package and the package name and destination where you want to install that package in your local system.
Loading R packages
It is very necessary to load the package every time before you use that.The library() functions are used to load the package.library(slidify) #load the slidify package
Rtools
These are the collection of tools need to build the packages in R.These tools are available for downloads.Click on the link below and select your version of the .exe link from the table.Once the download complete, open the .exe file to begin the installation.
No comments:
Post a Comment