Skip to content
Snippets Groups Projects
Verified Commit 518aa905 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

slides.Rmd: add R introduction

parent 223c968d
Branches
Tags
No related merge requests found
--- ---
title: "R#1: Introduction to R and RStudio" title: "R#1: Introduction to R and RStudio"
author: Laurent Modolo [laurent.modolo@ens-lyon.fr](mailto:laurent.modolo@ens-lyon.fr) author: Laurent Modolo [laurent.modolo@ens-lyon.fr](mailto:laurent.modolo@ens-lyon.fr)
date: 6 Jun 2018 date: 10 Oct 2019
output: output:
beamer_presentation: beamer_presentation:
theme: "metropolis" theme: "metropolis"
slide_level: 3 slide_level: 3
fig_caption: false
df_print: tibble
highlight: tango
latex_engine: xelatex
--- ---
The goal of this practical is to familiarize yourself with R and the RStudio The goal of this practical is to familiarize yourself with R and the RStudio
environment. environment.
The objectives of this session will be to:
- Understand the purpose of each pane in RStudio
- Do basic computation with R
- Define variables and assign data to variables
- Manage a workspace in R
- Call functions
- Manage packages
---
\begin{columns}
\begin{column}{0.5\textwidth}
\includegraphics[width=\textwidth]{img/software_carpentry_logo}
{\bf https://software-carpentry.org/}
\end{column}
\begin{column}{0.5\textwidth}
\includegraphics[width=\textwidth]{img/r_for_data_science.png}
\end{column}
\end{columns}
# Some R background # Some R background
```{r, out.width = "40px",echo=FALSE} \includegraphics[width=40pt]{img/Rlogo.png}
knitr::include_graphics("img/Rlogo.png")
```
is a programming language and free software environment for statistical is a programming language and free software environment for statistical
computing and graphics supported by the *R Foundation for Statistical Computing*. computing and graphics supported by the *R Foundation for Statistical Computing*.
--- ---
```{r, out.width = "40px",echo=FALSE} \includegraphics[width=40pt]{img/Rlogo.png}
knitr::include_graphics("img/Rlogo.png")
```
- created by **Ross Ihaka** and **Robert Gentleman** - created by **Ross Ihaka** and **Robert Gentleman**
- free and opensource implementation the S programming language
- initial version released in 1995 - initial version released in 1995
- at the University of Auckland, New Zealand - free and open source implementation the S programming language
- currently developed by the **R Development Core Team**. - currently developed by the **R Development Core Team**.
--- ---
```{r, out.width = "100%",echo=FALSE}
knitr::include_graphics("img/R_terminal.png") Reasons to use \includegraphics[width=40pt]{img/Rlogo.png}
```
- it’s free, well-documented, and runs almost everywhere
- it has a large (and growing) user base among scientists
- it has a large library of external packages available for performing diverse tasks.
- 15,068 available packages on https://cran.r-project.org/
- 3,087available packages on http://www.bioconductor.org
- 122,720 available repository on https://github.com/
---
\includegraphics[width=\textwidth]{img/R_terminal.png}
# RStudio, the R IDE # RStudio, the R IDE
...@@ -45,22 +76,36 @@ application that provides {\bf comprehensive facilities} to computer programmers ...@@ -45,22 +76,36 @@ application that provides {\bf comprehensive facilities} to computer programmers
software development software development
\end{block} \end{block}
- free
- open source
## An interface ## An interface
![RStudio](img/RStudio.png) \includegraphics[width=\textwidth]{img/RStudio.png}
## The same console as before ## The same console as before
![R console](img/RStudio_console.png) \includegraphics[width=\textwidth]{img/RStudio_console.png}
## A code editor ## A code editor
![R editor](img/RStudio_editor.png) \includegraphics[width=\textwidth]{img/RStudio_editor.png}
## Various outpus ---
RStudio offers you great flexibility in running code from within the editor window. There are buttons, menu choices, and keyboard shortcuts. To run the current line, you can
![R outputs](img/RStudio_outputs.png) - click on the Run button above the editor panel, or
- select “Run Lines” from the “Code” menu, or
- hit Ctrl+Return in Windows or Linux or ⌘+Return on OS X. To run a block of code, select it and then Run.
If you have modified a line of code within a block of code you have just run, there is no need to reselect the section and Run, you can use the next button along, Re-run the previous region. This will run the previous code block including the modifications you have made.
## The environment ## The environment
![R environment](img/RStudio_environment.png) \includegraphics[width=\textwidth]{img/RStudio_environment.png}
## Various outpus
\includegraphics[width=\textwidth]{img/RStudio_outputs.png}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment