As some inspiration for today, I collected a loose list of recommendations (data/tech communities, blogs, and podcasts) for anyone interested in the #data field ๐ฉ๐ผโ๐ป
๐ R-Ladies, PyLadies, and CorrelAid โ these are fantastic communities! Before founding @rladies_cologne last year, I had only positive experiences with the community - they have interesting talks and the Slack community is extremely helpful when you have a question ๐
@rladies_cologne@RLadiesGlobal ๐ The same goes for @pyladies ๐ my vision has always been to bring both communities together and itโs been a fun ride to host our first R-Ladies๐PyLadies event in July this year (with more to come!)
@rladies_cologne@RLadiesGlobal@pyladies@CorrelAid ๐ Another great network is @wimlds (founded by Erin LeDell) - they also have a Slack channel which is my go-to place for tricky (not necessarily language-specific) questions ๐
@antoine_fabri Letโs take a look at it by using our make_sum function from yesterday. We wrote this simple function that calculates the sum:
@antoine_fabri But what happens under the hood? We can see it here in code language but wouldn't it be great to see it more visually? Here's {flow}'s moment to shine! โจ Run this line of code and you'll get a flow diagram that shows you how the function works ๐ฅณ
Yesterday we talked about function writing and how to write them in R. But there is (unfortunately) a chance that your function won't work at the first try - and that's where debugging comes in ๐ต๏ธโโ๏ธ
Ways to approach this problem are, for instance, to google the error message (if there is one), take separate parts of your code and let them run, or to use the more formal debugging tools that #rstats offers.
One major thing that I learned throughout the years is the power of #debugging. Irrespective of the programming language I use, debugging is for me key when it comes to understanding the functionality of code (also for code written by someone else).
Let's use the remaining time today to dig into best practices when it comes to function writing first โจ It's a loose collection of things that I picked up from others and that I experienced myself as being helpful. They are not ranked in a specific order.
๐ช Use curly brackets - it makes it easier to read and work with your functions.
๐ช Use meaningful names for your functions. It's good to use verbs for functions.
The beauty of R is its versatility and of course the community ๐ you can use R (and different #CRAN packages) for literally anything (I use #shiny to build web applications, #blogdown to set up and maintain my website, #xaringan to create slide decks, โฆ.).
All these great tools build upon one โlittleโ (or not so little) thing: functions!
๐ก What are functions?
A function is an inherent code block that performs a specific task, such as calculating a sum. And that's exactly what we are doing now ๐
Hello everyone ๐ my name is Cosima and I usually tweet at @cosima_meyer.
In my professional life, I work as a data scientist in the field of AI. I love my job because it allows me to work with fantastic teams to solve puzzles๐ฉ๐ผโ๐ป
@cosima_meyer Before working in the industry, I explored my passion for research in academia. I hold a PhD from the University of Mannheim in #politicalscience (my dissertation dealt with post-civil war stability ๐).