UCSB-MEDS / functions-workshop

An example to demo taking an iterative approach to streamlining workflows using functions and for loops
https://ucsb-meds.github.io/functions-workshop/
1 stars 0 forks source link

Topics to include #1

Open samanthacsik opened 1 year ago

samanthacsik commented 1 year ago

Why write functions

When to write a function Generally, whenever you've copied/pasted a block of code more than 2x, though an argument can be made that turning code into functions to make it more readable is great whenever

Words of Wisdom Always new techniques/better ways of approaching problems. This workshop is only an intro to get you started

samanthacsik commented 1 year ago

3 components to a function

  1. function name
  2. function arguments
  3. function body
samanthacsik commented 1 year ago

Ideas

samanthacsik commented 1 year ago

https://rpubs.com/an-bui/fun-functions https://learning.nceas.ucsb.edu/2023-02-arctic/functions-and-packages.html#creating-r-functions

samanthacsik commented 1 year ago