Data clean
Change values
# Perform the required changes based on the symbol column
Immigrant <- Immigrant_ori %>%
mutate(
ipoYear = case_when(
symbol == "IRBS" ~ 2000,
symbol == "IYXI" ~ 2003,
TRUE ~ ipoYear
),
country = case_when(
symbol == "GOTO.TA" ~ "AU",
TRUE ~ country
)
) %>%
filter(symbol != "VTRS")
GOTO <- Immigrant %>% filter(symbol == "GOTO.TA") # check the modified rows
rm(GOTO) # remove it after checking