Master R's "Apply" family functions with this quick guide.
👤 Meghan Harris
🔗 https://www.thetidytrekker.com/post/applyfamilynotes/apply-family.html
#rladies#rstats#oldiebutgoodie#r#rprogramming#baser#apply#lapply#sapply#functionalprogramming
Master R's "Apply" family functions with this quick guide.
👤 Meghan Harris
🔗 https://www.thetidytrekker.com/post/applyfamilynotes/apply-family.html
#rladies#rstats#oldiebutgoodie#r#rprogramming#baser#apply#lapply#sapply#functionalprogramming
📍 Compute! Paris 2026 — Nov 25–26
futurize.futureverse.org
👉 compute.events/paris2026%22
📍 Compute! Paris 2026 — Nov 25–26
futurize.futureverse.org
👉 compute.events/paris2026%22
ids <- unique(d$patientID)
b <- 200
assignment <- ids |>
rep(b) |>
sample() |>
split(rep(seq_len(b), each = length(ids))) |>
unname() |>
# if you want separate cluster ids for each resample
lapply(function(xs) data.frame(patientID = xs, resample_id = seq_along(xs)))
ids <- unique(d$patientID)
b <- 200
assignment <- ids |>
rep(b) |>
sample() |>
split(rep(seq_len(b), each = length(ids))) |>
unname() |>
# if you want separate cluster ids for each resample
lapply(function(xs) data.frame(patientID = xs, resample_id = seq_along(xs)))
My previous horrors were grep(TRUE, …) because I didn’t know about which and lapply(as.list(), …) because I didn’t know about sapply.
Am I the only one who does this?
My previous horrors were grep(TRUE, …) because I didn’t know about which and lapply(as.list(), …) because I didn’t know about sapply.
Am I the only one who does this?
Supports OpenAI, Claude & Gemini. Includes a Shiny add-in. By @dylanpieper.bsky.social
#GenAI #R
github.com/dylanpieper/...
Supports OpenAI, Claude & Gemini. Includes a Shiny add-in. By @dylanpieper.bsky.social
#GenAI #R
github.com/dylanpieper/...
, Use these R Shiny Packages Instead https://www.r-bloggers.com/forget-about-excel-use-these-r-shiny-packages-instead/ via @Rbloggers
, Use these R Shiny Packages Instead https://www.r-bloggers.com/forget-about-excel-use-these-r-shiny-packages-instead/ via @Rbloggers
#statisticsmcqs #Rlanguage #RProgramming #learnR #Rdataanalysis #Rquiz #RlanguageMCQs #RBasics #Rwork
#statisticsmcqs #Rlanguage #RProgramming #learnR #Rdataanalysis #Rquiz #RlanguageMCQs #RBasics #Rwork
https://github.com/tidyverse/ggplot2/issues/6539
I think it's an actual bug and not just me being clueless, but happy to be told otherwise :)
https://github.com/tidyverse/ggplot2/issues/6539
I think it's an actual bug and not just me being clueless, but happy to be told otherwise :)
for some reason filtering with a value assigned to 'x' isn't working here (I was trying to make a dummy dataset for an lapply + ggplot problem I'm having, and instrad have bumped into this weird inconcistency).
df <- data.frame(name = […]
for some reason filtering with a value assigned to 'x' isn't working here (I was trying to make a dummy dataset for an lapply + ggplot problem I'm having, and instrad have bumped into this weird inconcistency).
df <- data.frame(name = […]
I love `across`, it's far better then the only "stop and use lapply/map to apply some logic to certain columns".
I love `across`, it's far better then the only "stop and use lapply/map to apply some logic to certain columns".