Import your data

data <- read.csv("../00_data/myData.csv")

Pivoting

long to wide form

wide to long form

data_wide <- data %>%
    
    pivot_wider(names_from = yearpublished,
                values_from = owned)

Separating and Uniting

Separate a column

data_sep <- data %>%
    
    separate(col = playingtime, into = c("minplayers", "maxplayers"))
## Warning: Expected 2 pieces. Missing pieces filled with `NA` in 21631 rows [1, 2,
## 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...].

Unite two columns

data_sep <- data %>%
    
    unite(col = playingtime, c(minplayers,maxplayers),sep = "/")

Missing Values