JacksonDels,
Assuming your data is in an spreadsheet, here's some code that will do what you're trying to do.
# Load libraries
library(tidyverse)
library(lubridate)
# Read in data table
df <- readxl::read_xlsx("angels.xlsx")
# Create two new columns for "Home" and "Away" teams
df <- df %>%
mutate("Home_Team" = if_else(str_detect(string = Angels, pattern = "@"), str_remove(string = Angels, pattern = "@"), "Angels")) %>%
mutate("Away_Team" = if_else(str_detect(string = Angels, pattern = "@"), "Angels" ,str_remove(string = Angels, pattern = "@")))
Good Luck!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…