R Intro

I. Bartomeus
September 2022

R Intro

Class structure

  • There are lots of online R courses and books
  • Here we come to make mistakes
  • Here we come to solve problems

Aims

  • Learn you can do anything with R.
  • Know how to google it.
  • Lose the respect for R.

Stackoverflow.

Why R?

R has simple and obvious appeal. Through R, you can sift through complex data sets, manipulate data through sophisticated modeling functions, and create sleek graphics to represent the numbers, in just a few lines of code…R’s greatest asset is the vibrant ecosystem has developed around it: The R community is constantly adding new packages and features to its already rich function sets.

The 9 Best Languages For Crunching Data

Is R ?always the right tool?

No always. Limitations:

  • Learning curve; inconsistent syntax
  • Fragmented documentation (?help, vignettes, etc…)
  • Quality of packages is heterogeneous.
  • Bad with Big Data.

Other tools:

  • Julia, Python, C++, bash, …
  • Excel? never.

R: Reproducibilidad

It’s important to make a workflow that you can use time and time again, and even pass on to others in such a way that you don’t have to be there to walk them through it. Source

Your closest collaborator is you 6 months ago, and you don't respond to emails. P. Wilson

Interested: read our paper

Style

Da igual cual sigas, lo importante es tener uno I. Bartomeus

Mine: link

google: Link

Open R studio

  • scripts
  • consola
  • environment
  • files/plots

Projects

Dir

1-get_data.R
2-process_data.R
3-analyze_data.R
4-make_graphs.R
data/
figures/