Hello. The following "dataset 1" is the dataset I am using. I want to replace year_withdrawal with 2007 in observation 1, replace year_sign with 1993 in observation 2, and replace withdrawalnumber with 243 in obseravtion 1. The final goal is change the "dataset 1" to the "dataset 2"
dataset1
clear
input str5(ISO1 ISO2) float year str6 number int base_treaty float(year_sign year_withdrawal withdrawalnumber)
"AGO" "BDI" 1993 "243" 243 1993 . .
"AGO" "BDI" 2007 "243_4" 243 . 2007 243
"AGO" "COD" 1993 "243" 243 1993 . .
"AGO" "COD" 2007 "243_4" 243 . 2007 243
"AGO" "COM" 1993 "243" 243 1993 . .
"AGO" "COM" 2007 "243_4" 243 . 2007 243
"AGO" "DJI" 1993 "243" 243 1993 . .
"AGO" "DJI" 2007 "243_4" 243 . 2007 243
"AGO" "EGY" 1998 "243+1" 243 1998 . .
"AGO" "EGY" 2007 "243_4" 243 . 2007 243
end
dataset2
clear
input str5(ISO1 ISO2) float year str6 number int base_treaty float(year_sign year_withdrawal withdrawalnumber)
"AGO" "BDI" 1993 "243" 243 1993 2007 243
"AGO" "BDI" 2007 "243_4" 243 1993 2007 243
"AGO" "COD" 1993 "243" 243 1993 2007 243
"AGO" "COD" 2007 "243_4" 243 1993 2007 243
"AGO" "COM" 1993 "243" 243 1993 2007 243
"AGO" "COM" 2007 "243_4" 243 1993 2007 243
"AGO" "DJI" 1993 "243" 243 1993 2007 243
"AGO" "DJI" 2007 "243_4" 243 1993 2007 243
"AGO" "EGY" 1998 "243+1" 243 1998 2007 243
"AGO" "EGY" 2007 "243_4" 243 1998 2007 243
end
ISO1: country name
ISO2:country name
number: different versions of base_treaty
base_treaty: number of treaty
year_sign: the year when ISO1 and ISO2 signed a treaty
year_withdrawal:the year when ISO1 and ISO2 withdrawal a treaty
dataset1
clear
input str5(ISO1 ISO2) float year str6 number int base_treaty float(year_sign year_withdrawal withdrawalnumber)
"AGO" "BDI" 1993 "243" 243 1993 . .
"AGO" "BDI" 2007 "243_4" 243 . 2007 243
"AGO" "COD" 1993 "243" 243 1993 . .
"AGO" "COD" 2007 "243_4" 243 . 2007 243
"AGO" "COM" 1993 "243" 243 1993 . .
"AGO" "COM" 2007 "243_4" 243 . 2007 243
"AGO" "DJI" 1993 "243" 243 1993 . .
"AGO" "DJI" 2007 "243_4" 243 . 2007 243
"AGO" "EGY" 1998 "243+1" 243 1998 . .
"AGO" "EGY" 2007 "243_4" 243 . 2007 243
end
dataset2
clear
input str5(ISO1 ISO2) float year str6 number int base_treaty float(year_sign year_withdrawal withdrawalnumber)
"AGO" "BDI" 1993 "243" 243 1993 2007 243
"AGO" "BDI" 2007 "243_4" 243 1993 2007 243
"AGO" "COD" 1993 "243" 243 1993 2007 243
"AGO" "COD" 2007 "243_4" 243 1993 2007 243
"AGO" "COM" 1993 "243" 243 1993 2007 243
"AGO" "COM" 2007 "243_4" 243 1993 2007 243
"AGO" "DJI" 1993 "243" 243 1993 2007 243
"AGO" "DJI" 2007 "243_4" 243 1993 2007 243
"AGO" "EGY" 1998 "243+1" 243 1998 2007 243
"AGO" "EGY" 2007 "243_4" 243 1998 2007 243
end
ISO1: country name
ISO2:country name
number: different versions of base_treaty
base_treaty: number of treaty
year_sign: the year when ISO1 and ISO2 signed a treaty
year_withdrawal:the year when ISO1 and ISO2 withdrawal a treaty
Comment