Penyanyi : How to Install R Packages
Judul lagu : How to Install R Packages
How to Install R Packages
Portal-Statistik |Today I will shared about R Application and R Packages, I think this tutorial for beginers only, not for master or professional programmer.R is a powerfull application for analytics, R is open source software, all of people can devlope it.
One of the reasons R Application to be very popular software is the availability of a package (collection of functions, data and code). Until now, there are more than 6 thousand R packages in CRAN repository. Not including packages provided by other sources. The packages number continues to growing from day-to-day exponentially.
If you installed R for the first time, only a few standard packages that come installed. So you must be install R packages as your need.
This tutorial, explain you step by step how to install R Packages.
Installing R packages from a local.
- The first, Download your packages form the CRAN R , from the cran select and download the package you want to install.
- After downloaded your packages .ZIP or .TAR.GZ file, In GUI of R application select Packages Menu and choose install package(s) from local zip files...
- Select the .ZIP or .TAR.GZ file that you downloaded
- If successful, the R console will give a message package 'twitteR' successfully unpacked and MD5 sums checked.
Installing R Packages directly from CRAN repository
When you're connected to the Internet, installing R packages can directly performed from the CRAN repository. The way is very simple , just use the command:install.packages("pkgs")"pkgs" is the package you want to install, package name is case-sensitive, you must be correct writing the name. For Example, you want to install twitter packages. You must be write
install.packages("twitteR")Then select the CRAN mirror, for example, "Indonesia (Jakarta)". Same as installing packages from a local file, the R console will give a message package 'twitteR' successfully unpacked and MD5 sums checked.
To install two or more packages in one command, for example, twitteR and ggplot2 packages, just use the command
install.packages(c("twitteR", "ggplot2"))
After the installation process are completed, load the package to the R session
library(twitteR)Two packages are installed and running to the R session, It’s so simple right?
library(ggplot2)
Installing R Packages from GITHUB
Aside from CRAN, we can also install the R package (usually the developer version) from GitHub using install_github () command. The command is on the devtools package. The following steps to install R package from GitHub:The first, Install and load the devtools package into the R session
install.packages("devtools")
library(devtools)
Running the command install_github(package, username) or install_github(username/package)
For Example
install_github("wch/ggplot2")OR
install_github("ggplot2", "wch")Or, To install two or more packages in one command
install_github(c("geoffjentry/twitteR", "wch/ggplot2"))
Thanks for visitng my blog,
Good Luck
Happy Learning !
Demikianlah Artikel How to Install R Packages
Sekian Kunci gitar How to Install R Packages, mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sekian postingan Chord gitar lagu kali ini.
0 Response to "How to Install R Packages"
Post a Comment