All #HealthyR #rstats advent calendar posts of R tips now at https://healthyradvent.netlify.app/
Most popular:
💡Understanding linear/logistic regression
📈Univariable vs multivariable
⚰️Confounding
JKL20 for 20% off, free worldwide shipping: https://www.routledge.com/R-for-Health-Data-Science/Harrison-Pius/p/book/9780367428198
Are you tired of manually copying and pasting data from multiple sheets in an Excel file? Say no more! In this post, we will show you how to use R programming to read in an Excel file with multiple sheets using a simple function.
Post: https://www.spsanderson.com/steveondata/posts/rtip-2023-04-07/
#data #dataanlysis #excel #readxl #healthyr #r #rstats #opensource #softwaredevelopment #tibble #dplyr
#dplyr #tibble #softwaredevelopment #OpenSource #RStats #r #healthyr #readxl #Excel #dataanlysis #Data
🌟Day 24 - Season's Greetings, Part 3/3🌟
+ scale_fill_identity()
I use scale_fill_brewer() or scale_fill_manual() more, but this works well here 🎄
That's the #HealthyR #rstats Advent Calendar! Thank you for thinking along and happy holidays 🎉
Our courses and free resources: https://healthyr.surgicalinformatics.org/
Image code at: https://gist.github.com/riinuots/f7911684e8e6f6b1a0388652ad182c79
🌟Day 23 - #HealthyR #rstats Season's Greetings, Part 2/3🌟
Note the two different ways of creating data - tibble and tribble. This is useful if you need to make a reproducible example!
Anyone want to guess what tomorrow's single additional line is?
https://gist.github.com/riinuots/f3d2788b6a43c927f3485c6b8f9a1da0
🌟Day 22 - #HealthyR #rstats Season's Greetings, Part 1/3🌟
That's enough regression for this year!
Execute this code in your head or an IDE, further instalments coming on the remaining days of our Advent Calendar 2022 🎄 https://gist.github.com/riinuots/52c0089bd5c41a44389e95cc8cb3943d
RT @_Riinu_@twitter.com
🌟Day 21 - confounding🌟
Same made-up data on both plots.
A - coffee seems to have an effect on blood pressure
B - except that it was completely confounded in heavy coffee drinkers also smoking
#HealthyR #rstats "R for Health Data Science"📖 :
https://argoshare.is.ed.ac.uk/healthyr_book/regression.html
RT @_Riinu_@twitter.com
🌟Day 21 - confounding🌟
Same made-up data on both plots.
A - coffee seems to have an effect on blood pressure
B - except that it was completely confounded in heavy coffee drinkers also smoking
#HealthyR #rstats "R for Health Data Science"📖 :
https://argoshare.is.ed.ac.uk/healthyr_book/regression.html
🌟Day 21 - confounding🌟
Same made-up data on both plots.
A - coffee seems to have an effect on blood pressure
B - except that it was completely confounded in heavy coffee drinkers also smoking
#HealthyR #rstats "R for Health Data Science"📖 https://argoshare.is.ed.ac.uk/healthyr_book/regression.html
🌟Day 20 - We're just trying to find a model that best describes the data🌟
Same made-up data on each plot:
A univariable
B, C multivariable
Note the R-squared 😉
#HealthyR #rstats "R for Health Data Science"📖 chapter: https://argoshare.is.ed.ac.uk/healthyr_book/regression.html
🌟Day 19 - Restart R regularly🌟
Do this now so that old data won't come back to haunt you:
👻Tools -> Global Options
👻👻Uncheck restore
👻👻👻Never save on exit
Then save and load objects consciously!
#HealthyR #rstats "R for Health Data Science"📖:
https://argoshare.is.ed.ac.uk/healthyr_book/restart-r-regularly.html
🌟Day 18 - RStudio interface for R Markdown🌟
Lots of useful buttons and options 🙈
Here are the most useful ones 💡
#HealthyR #rstats "R for Health Data Science" 📖:
https://argoshare.is.ed.ac.uk/healthyr_book/interface-and-outputting.html
🌟Day 17 – Understanding R Markdown🌟
Header📍
Headings🗂
Text📝
Inline code - code inside text💙
Code chunk💙
Output (in this example it's a plot)📈
#HealthyR #rstats "R for Health Data Science" 📖:
https://argoshare.is.ed.ac.uk/healthyr_book/the-anatomy-of-a-notebook-r-markdown-file.html
RT @_Riinu_@twitter.com
🌟Day 16 – Understanding logistic regression🌟
Dependent (=outcome): adverse event (Yes/No)
Explanatory variables:
cups of ☕ (n); 🚬 (Yes/No)
(made-up data)
Weekend posts will be lighter, promise 🧠
#HealthyR #rstats "R for Health Data Science" 📖:
https://argoshare.is.ed.ac.uk/healthyr_book/binary-logistic-regression.html
RT @_Riinu_@twitter.com
🌟Day 15 – Understanding linear regression🌟
Real talk - first step to understanding logistic regression is understanding linear regression. So please have a 👀 and 🧠 even if your data needs log./Cox.
#HealthyR #rstats "R for Health Data Science" 📖:
https://argoshare.is.ed.ac.uk/healthyr_book/regression.html