Hello @innerhoops1219. Apologies, but I do not understand the question. Using the screenshot provided, can you provide some examples of what you would like the end result to look like? What are you interested in changing exactly? Thanks!!!
-Casey
Below is the code for two examples: (1) split the column Breakpoint/sideout into separate columns called Sideout and Breakpoint, and (2) split the column Phase into two columns Reception and Transition.
library(readxl)
data <- read_xlsx("Book1.xlsx")
library(dplyr)
library(tidyr)
# Create separate columns called "Breakpoint" and "Sideout"
# The original column "`Breakpoint/sideout`" is removed
data <- data %>% pivot_wider(names_from = `Breakpoint/sideout`,
values_from = `Breakpoint/sideout`)
# Create separate columns called "Reception" and "Transition"
# The original column "Phase" is removed
data <- data %>% pivot_wider(names_from = `Phase`,
values_from = `Phase`)
This function is concise but powerful. Does this provide the desired result you are looking for?
Best,
-Casey