class: center, middle, inverse, title-slide .title[ # Introduction To Programming in R (1) ] .subtitle[ ## R Foundations for Life Scientists ] .author[ ### Marcin Kierczak ] --- exclude: true count: false <link href="https://fonts.googleapis.com/css?family=Roboto|Source+Sans+Pro:300,400,600|Ubuntu+Mono&subset=latin-ext" rel="stylesheet"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> <!-- ------------ Only edit title, subtitle & author above this ------------ --> --- name: programming_language # Computer program -- * flow of data -- * from one function to another -- * each function does something to the data -- # How? -- > A **programming language** is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms. .small[[Wikipedia](https://en.wikipedia.org/wiki/Programming_language)] -- # Three things to think about * what *types* of data can I process? -- * how do I *write* what I want? -- * when does it *mean* anything? --- # Three components of a language -- * what *types* of data can I process — *type system* -- * int — 1 2 5 9 * double — 1.23 -5.74 * char — a b test 7 9 -- * how do I *write* what I want — *syntax* defined by a language *grammar* `2 * 1 + 1` vs. `(+ (* 2 1) 1)` -- * when does it *mean* anything — *semantics* -- * *Colorful yellow train sleeps on a crazy wave.* — has no generally accepted meaning * *There is $500 on his empty bank acount.* — internal contradiction --- name: topic2 # Where to start? *Divide et impera* — divide and rule. **Top-down approach:** define the big problem and split it into smaller ones. Assume you have solution to the small problems and continue — push the responsibility down. Wishful thinking! <!-- --------------------- Do not edit this and below --------------------- --> --- name: end_slide class: end-slide, middle count: false # Thank you. Questions? .end-text[ <p class="smaller"> <span class="small" style="line-height: 1.2;">Graphics from </span><img src="./assets/freepik.jpg" style="max-height:20px; vertical-align:middle;"><br> Created: 31-Oct-2024 • <a href="https://www.scilifelab.se/">SciLifeLab</a> • <a href="https://nbis.se/">NBIS</a> </p> ]