- R is an interpreted computer programming language i.e line by line compilation.
- It is also a software environment used to analyze statistical information, graphical representation, reporting, and data modeling.
- The modern implementation of S is R, a part of the GNU free software project. S-PLUS, is a commercial product, formerly sold by TIBCO Software.
- R is the implementation of the S programming language, which is combined with lexical scoping semantics.
- Used for machine learning, data analytics, etc.
- R has automatically created packages related to trending technology and algorithms.
- R was developed by Ross Lhaka and Robert Gentleman. First version was released in 1992 and version 4.0.0 in 2020.
- Procedural programming and OOPS with generic functions.
- Easily integrated with Hadoop and HDFS, C, C++, Python, Java, Fortran, and javascript.
- Free to use.
- 1500+ packages available for R on online repositories like CRAN, Github, etc.
- Powerful graphics:- ggplot2 and plotly.
- Interpreted language. No need for a compiler.
- Cross platform support i.e can run on any OS and system.
- Perform fast calculations i.e wide variety of complex operations can be possible.
All Machine learning algorithms are available and provide tools that help with machine learning as well.
- Data analysis and statistical analysis as well as machine learning.
- Create packages, functions, objects in R. Platform independent.
- 2 Million jobs for R programmers worldwide for data analytics, business analytics, data visualization expert, business intelligence experts.
- Data science industry using R like health, finance, banking, manufacturing and many more.
It has 4 parts
- Editor for writing the R script or program.
- Global Environment where all the variables will be shown whichever you will create.
- Console, terminal, background jobs where output of scripts will be shown, command line terminal and background tasks if any running.
- Files, plots, packages, viewer will show files in root directory of R, plots will show all the graphs we will create, packages will contain all the packages available in R studio to install and update packages, Viewer
- To execute script 'ctrl+enter'
- Use script to save R programs and execute them.
- Extension will be .R
- Ctrl+R to run the script. Output will be shown on the console.
- Edit -> Run all to run complete script in one go.
- '#' to comment eg.
#this is R studio
-
Sessioninfo() will tell us about the current session and packages attached to the session.
-
?plot(x) get help about the function.
-
R is case sensitive language.
-
All functions are mostly in lowercase letters.
-
It's crantastic - Repository of packages.
-
R-bloggers - R programming help.
-
In RStudio, start a new Project:
-
File > New Project > Version Control > Git.
-
In “Repository URL”, paste the URL of your new GitHub repository. It will be something like this https://github.com/abc/myrepo.git.
-
Accept the default project directory name, e.g. myrepo, which coincides with the GitHub repo name.
-
Take charge of – or at least notice! – where the Project will be saved locally. A common rookie mistake is to have no idea where you are saving files or what your working directory is. Pay attention. Be intentional. Personally, I would do this in ~/tmp.
-
I suggest you check “Open in new session”, as that’s what you’ll usually do in real life.
-
Click “Create Project”.
-
You should find yourself in a new local RStudio Project that represents your test repo on GitHub. This should download the README.md file from GitHub.
-
Look in RStudio’s file browser pane for the README.md file.