Statistics for Psychology II FW23

Happy Valentine’s Day!

Code
suppressPackageStartupMessages(library(tidyverse))

x <-  function(t) 16*sin(t)^3
y <- function(t) 13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t)

df <- tibble(t = seq(0, 2*pi, by = 0.01),
             y = y(t),
             x = x(t))

df |>
  ggplot(mapping = aes(x = x, y = y)) +
  geom_polygon(fill = "red", col = "firebrick", alpha = 0.8) +
  theme_void()

—courtesy of Kieran Healy