I have a database with 1000 rows. This database contains the id and name of the occupation for the year 2000 and the year 2010. I would like to create a new dataframe with the id and name of the occupations that were changed (the id, the name, or both were changed) and a dataframe with the id and name of the ones that have not changed. COuld you guys help me?
Here is a sample:
Data_Frame <- data.frame (
title_2000 = c(" All Other Managers", "Industrial Production Managers", "Sales Managers", "Logistics Engineers", "Accountants and Auditors"),
code_2000 = c("11-9199", "11-3051", "11-2022", "13-1081", "13-2011"),
title_2010 = c("Entertainment and Recreation Managers, Except Gambling", "Industrial Production Managers", "Sales Managers", "Logisticians", "Accountants and Auditors"),
code2010 = c("11-9072", "11-3051", "11-2022","13-1081","13-2011")
)
# Print the data frame
Data_Frame
DF1 <- data.frame(title_2000 = c(" All Other Managers", "Logistics Engineers"),
code_2000 = c("11-9199", "13-1081"),
title_2010 = c("Entertainment and Recreation Managers, Except Gambling", "Logisticians"),
code2010 = c("11-9072", "13-1081")
)
DF1
DF2<- data.frame (
title_2000 = c( "Industrial Production Managers", "Sales Managers", "Accountants and Auditors"),
code_2000 = c( "11-3051", "11-2022", "13-2011"),
title_2010 = c( "Industrial Production Managers", "Sales Managers", "Accountants and Auditors"),
code2010 = c( "11-3051", "11-2022","13-2011")
)
DF2