Creator of the EpiRHandbook: https://epirhandbook.com/
📢 New courses posted! Intro to R for public health
🗓️ 40 hours part-time, synchronous, with unlimited 1-on-1 coaching and options for ALL time zones.
✏️ Register: appliedepi.org/training/pub...
📢 New courses posted! Intro to R for public health
🗓️ 40 hours part-time, synchronous, with unlimited 1-on-1 coaching and options for ALL time zones.
✏️ Register: appliedepi.org/training/pub...
Transition your team to R with free or discounted courses and services.
Why apply?
✔️ Full or partial scholarships
✔️ Focused on strengthening public health capacity
🗓️ Apply by Feb 10, 2025! 🌐 appliedepi.org/training/scholarships-ae
Transition your team to R with free or discounted courses and services.
Why apply?
✔️ Full or partial scholarships
✔️ Focused on strengthening public health capacity
🗓️ Apply by Feb 10, 2025! 🌐 appliedepi.org/training/scholarships-ae
💡 For teams in low- & middle-income countries working in epidemiology, this is your chance to access funding for courses and support services that help transition to R.
🗓️ Deadline: Feb 10, 2025
🌐 Apply here: appliedepi.org
💡 For teams in low- & middle-income countries working in epidemiology, this is your chance to access funding for courses and support services that help transition to R.
🗓️ Deadline: Feb 10, 2025
🌐 Apply here: appliedepi.org
If your team (government or nonprofit) works in applied epidemiology in a low- or middle-income country, you could get access to our Intro to R course and Support Desk! Details: appliedepi.org/training/sch...
#Rstats #epitwitter
If your team (government or nonprofit) works in applied epidemiology in a low- or middle-income country, you could get access to our Intro to R course and Support Desk! Details: appliedepi.org/training/sch...
#Rstats #epitwitter
Since he didn't share his location, we created a function (get_random_night_coords()) to randomly generate coordinates of a location with a current local time between 11pm and 3am, assuming those are his working hours!
Close enough!
Since he didn't share his location, we created a function (get_random_night_coords()) to randomly generate coordinates of a location with a current local time between 11pm and 3am, assuming those are his working hours!
Close enough!
geom_image() from {ggimage} places the image at specified coordinates, reading from the file path.
Here's the ggplot code for the second figure:
geom_image() from {ggimage} places the image at specified coordinates, reading from the file path.
Here's the ggplot code for the second figure:
This includes our Exec Director, an expert in "combo Xmas/bday" presents! Happy birthday Neale! 🎂
On that note, ever work with multiple date columns but need to pick one? Use coalesce() to easily prioritize a value!
#Rstats
This includes our Exec Director, an expert in "combo Xmas/bday" presents! Happy birthday Neale! 🎂
On that note, ever work with multiple date columns but need to pick one? Use coalesce() to easily prioritize a value!
#Rstats
That said, it does show the versality of ggplot!
That said, it does show the versality of ggplot!
There's still time to write your Christmas cards!
And what better captures the yuletide spirit than...R...
Seriously though, check out the {christmas} package by Jose Barrera-Gomez.. Stunning!
There's still time to write your Christmas cards!
And what better captures the yuletide spirit than...R...
Seriously though, check out the {christmas} package by Jose Barrera-Gomez.. Stunning!
The example above uses the same colour palette for each plot, with scale_fill_brewer().
For custom colours, you can also define a palette inside scale_fill_manual() - or as a separate object that you refer to (as discussed yesterday).
The example above uses the same colour palette for each plot, with scale_fill_brewer().
For custom colours, you can also define a palette inside scale_fill_manual() - or as a separate object that you refer to (as discussed yesterday).
Need many plots with the same style/formatting but slightly different inputs?
💡Create a custom ggplot function!
Define your plot upfront in the function, with all the long formatting code. Then run the function for each new plot with different inputs.
Need many plots with the same style/formatting but slightly different inputs?
💡Create a custom ggplot function!
Define your plot upfront in the function, with all the long formatting code. Then run the function for each new plot with different inputs.
Visualizing the same variables in different ways (e.g. sex by time/place)?
💡Tip: Easily standardize colour palettes by defining them once at the start of your code.
Then reuse the palettes within scale_fill_manual() or scale_color_manual() across plots.
Visualizing the same variables in different ways (e.g. sex by time/place)?
💡Tip: Easily standardize colour palettes by defining them once at the start of your code.
Then reuse the palettes within scale_fill_manual() or scale_color_manual() across plots.
Or, restart your R session.
Or, restart your R session.
Do you need a consistent plot style for a document?
Try theme_set()🎨
Define the look of fonts, grid lines, backgrounds, axis text etc once inside theme_set(). This will apply to all subsequent ggplots in your R session. No need for long theme() code per plot!
Do you need a consistent plot style for a document?
Try theme_set()🎨
Define the look of fonts, grid lines, backgrounds, axis text etc once inside theme_set(). This will apply to all subsequent ggplots in your R session. No need for long theme() code per plot!
Having a rough day?
The {praise} package is there for you.
Go on, give praise() a whirl.... ♥️
Having a rough day?
The {praise} package is there for you.
Go on, give praise() a whirl.... ♥️
Highlight code and then press:
🪟 Shift + Alt + Up/Down (Windows)
🍎 Option + Command + Up/Down (Mac)
Highlight code and then press:
🪟 Shift + Alt + Up/Down (Windows)
🍎 Option + Command + Up/Down (Mac)
Do this by highlighting code and then:
🪟 Alt + Up/Down (Windows)
🍎 Option + Up/Down (Mac)
Do this by highlighting code and then:
🪟 Alt + Up/Down (Windows)
🍎 Option + Up/Down (Mac)
Want to be in multiple places at once over the holidays?
We can't help you with that.
But - we can show you how to type in multiple places at once in RStudio! 😮
Useful when you need to make the same edit across your code but Find + Replace isn't suitable.
Want to be in multiple places at once over the holidays?
We can't help you with that.
But - we can show you how to type in multiple places at once in RStudio! 😮
Useful when you need to make the same edit across your code but Find + Replace isn't suitable.
Why do these two seemingly identical characters not equal each other in R?
Why do these two seemingly identical characters not equal each other in R?
Epis know well that missingness can skew analyses, so needs careful review. No fear, {naniar} can help! E.g.:
☑️pct_miss_case(): to check % of rows with NAs
☑️gg_miss_var(): to quickly visualize missingness by column
See more in Ch. 20 of the EpiRHandbook.com!
Epis know well that missingness can skew analyses, so needs careful review. No fear, {naniar} can help! E.g.:
☑️pct_miss_case(): to check % of rows with NAs
☑️gg_miss_var(): to quickly visualize missingness by column
See more in Ch. 20 of the EpiRHandbook.com!