# NOT RUN {
# To convert data frame to tidy data (long) format, run:
library(dplyr)
library(tidyr)
library(stringr)
bob_ross_tidy <- bob_ross %>%
pivot_longer(-c(episode, season, episode_num, title),
names_to = "object", values_to = "present") %>%
mutate(present = as.logical(present)) %>%
arrange(episode, object)
# }
Run the code above in your browser using DataLab