R
What do you know about R and RStudio?
R Overview
R is a free R is an integrated suite of software facilities for data manipulation, calculation and graphical display.
According to (R-Project.org 2020), the R environment includes:
- an effective data handling and storage facility,
- a suite of operators for calculations on arrays, in particular matrices,
- a large, coherent, integrated collection of intermediate tools for data analysis,
- graphical facilities for data analysis and display either on-screen or on hardcopy, and
- a well-developed, simple and effective programming language which includes conditionals, loops, user-defined recursive functions and input and output facilities.
RStudio
RStudio is an integrated development environment (IDE) for R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management. (RStudio Team 2015)
What this means is that you can use R through RStudio which provides helpful tools in an easier-to-use interface. By using this tool, a variety of projects can be created, stored, modified, and shared more easily. In fact, this learning module was written in RStudio using RMarkdown and a package called Bookdown (Xie 2020) (Xie 2016) which provides formatting publishing assistance.
Let’s take a moment to examine RStudio
Why use R?
Python (Python Core Team 2015) and R are the two most popular languages at the moment for data science, which is a field involving statistical analysis, data manipulation, data visualization, and communication.
You may be interested in using Python, a more general programming language, to do data analysis and may be interested in using some tools offered only with that language. You may be interested more in using R, or both! R has some advantages highlighted by the author of this article:
- interactive language
- data structures
- graphics
- missing values
- functions as first class objects
- packages
- community
What’s next for R?
Check out this article with Hadley Wickham, Chief Scientist at RStudio.
You may also want to read about R-Ladies, a group helping to close the gender gap in data science.
What else can R do besides calculations and some plots?
- Check out this gallery to see some examples of how R can be used!
- R can also use a package called ‘shiny’ to develop interactive dashboards to tell a more complete story!
- R can help you draw some nice maps using the Leaflet package.
- R can also help you do fun interactive network diagrams (Source):
library(igraph)
library(networkD3)
library(tibble)
# create a dataset:
data <- tibble(
from=c("A", "A", "B", "D", "C", "D", "E", "B", "C", "D", "K", "A", "M"),
to=c("B", "E", "F", "A", "C", "A", "B", "Z", "A", "C", "A", "B", "K")
)
# Plot
p <- simpleNetwork(data, height="100px", width="400px",fontSize = 18,linkColour = "#ff0000", nodeColour = "#96001e", opacity = 0.7, zoom = T)
p
What did you learn about R and RStudio?
What else do you want to know about R and RStudio?
References
Python Core Team. 2015. Python: A Dynamic, Open Source Programming Language. Python Software Foundation. https://www.python.org/.
R-Project.org. 2020. “What is R?” https://www.r-project.org/about.html.
RStudio Team. 2015. RStudio: Integrated Development Environment for R. Boston, MA: RStudio, Inc. http://www.rstudio.com/.
Xie, Yihui. 2016. Bookdown: Authoring Books and Technical Documents with R Markdown. Boca Raton, Florida: Chapman; Hall/CRC. https://github.com/rstudio/bookdown.
Xie, Yihui. 2020. Bookdown: Authoring Books and Technical Documents with R Markdown. https://github.com/rstudio/bookdown.