Fuck “both sides” bullshit.
Here is a SITTING #GOP Senator saying that interracial marriage laws should be left up to the states. In 2022.
FUCK BOTH SIDES BULLSHIT.
https://twitter.com/highbrow_nobrow/status/1572985195321507841
I still don't understand how, in
b %>% mutate(m=mean(post, na.rm=TRUE))
mean figures out that "post" is really "b$post". It's as if mutate has made a substitution here.
b %>% mutate(post=revised) works in the second section, but the next two lines after the "Why doesn't this work?" comment give errors.
I understand that in
b %>% mutate(m=mean(post, na.rm=TRUE))
mutate is taking an implicit first argument b, so this is equivalent to:
mutate(b, m=mean(post, na.rm=TRUE))
What confuses me here is mean. Is it taking an implicit first argument b?
If so, why doesn't
mean(b, post, na.rn=TRUE)
work?
If not, how does mean know where to find post?
It appears that mean is not a normal function, but some special thing that only works in the context of something like mutate.
15-year-old Python flaw found in 'over 350,000' projects (tarfile)
https://www.theregister.com/2022/09/22/python_vulnerability_tarfile/
@logoninternet When I was in high school one candidate ate a live goldfish as part of her presentation. She lost.
I didn't realize that #Firefox had a built-in eye-dropper for grabbing colors. Nice!
https://firefox-source-docs.mozilla.org/devtools-user/eyedropper/index.html
https://youtu.be/0Zx1TN21QOo
#Rstats mystery
library(tidyverse)
b <- tibble(pre=c(8,8,5,3), post=c(8, 8, 5, NA))
# This works
b %>% mutate(post = if_else(is.na(post), mean(post, na.rm=TRUE), post))
# But what if that expression is too hairy for the student? In other languages,
# you can separate out and name the parts. You can do that in R by using the
# completely different $ syntax:
mean_of_others <- mean(b$post, na.rm=TRUE)
revised <- if_else(is.na(b$post), mean_of_others, b$post)
b %>% mutate(post = revised)
# Why doesn't this work? Do mean and if_else not work with the pipe unless they
# are inside something like mutate?
mean_of_others <- b %>% mean(post, na.rm=TRUE) # Error!
revised <- b %>% if_else(is.na(post), mean_of_others, post) # Error!
b %>% mutate(post = revised)
#Rstats seems to have missed this memo:
"Orthogonality in a programming language means that a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language.[2] It is associated with simplicity; the more orthogonal the design, the fewer exceptions. This makes it easier to learn, read and write programs in a programming language[citation needed]. The meaning of an orthogonal feature is independent of context; the key parameters are symmetry and consistency (for example, a pointer is an orthogonal concept)."
Show: The Muppet Show
Guest: Sylvester Stallone
Song: "The Rambo Connection"
Daybreak, Matt Leacock's new board game about climate change, looks fun, hopeful, and educational.
marks th' spot. The Moon be a treasure trove o' science, water 'n resources. Startin' wit Arrrtemis I, we'll return astronauts to the lunar surface by 2024. So, fire ye pyros & ye main engine 'n get excited as we prepare for Marrrs!#TalkLikeAPirateDay: https://www.nasa.gov/what-is-artemis?utm_source=TWITTER&utm_medium=NASA&utm_campaign=NASASocial&linkId=73950047
Arrgh ye filthy landlubbers, tis Talk Like A Pirate Day! Brace the mainsail! Swab the poop deck! Give no quarter! 🏴☠️☠️ #talklikeapirateday
CS professor, game designer, and fire dancer ordinaire.