R 创建数据框dataframe示例
id = c(1,2,1,4,2) year = c(1980, 1990, 2000, 2010, 2020) salary = c(2000, 3000, 4000, 5000, 6000) df = data.frame(id, year, salary); df # id year salary # 1 1 1980 2000 # 2 2 1990 3000 # 3 1 2000 4000 # 4 4 2010 5000 # 5 2 2020 6000