Things to remember

  • Any programming language can solve any problem
  • But some things are much more natural in some languages than others
  • And some languages also have some amazing libraries to help!

Programming styles

Language types

What do you need to think about?

  • What you want to do

  • What the easiest way of doing it is

  • What languages make that easy

So...

What do you want to do?

What's good about R?

  • Approachable scripting language
  • Interactive interpreter
  • Dynamic typing, imperative, structured
  • Great statistical and graphical libraries
  • Powerful development environment in RStudio
  • Making it easy to develop your own packages

What's bad about R?

  • Interpreted languages are slow
  • So new libraries are rarely written in R!
  • Complex handwritten models are slow
  • Graphics capabilities are fixed and complicated, though extensive...
  • Lack of type checking means you’ll often struggle to know what went wrong
  • Not all libraries are well written

What's different about R?

  • Formulae and factors
  • Data frames, and ease of manipulating data
  • Plotting data
  • Massive database of user-supplied packages
  • Easy(-ish!) to create your own packages

A note of packages you use {.smaller}

{R, comment=""} citation("deSolve")

What does this tell us?

R is designed for:

So what have you learned?

Conclusions

Languages

{ width=100% }

Writing Fragile Code

Writing fragile code...



IBAHCM/RPiR documentation built on Jan. 12, 2023, 7:41 p.m.