Code working on one table but not on other, wich is identical structure of first one

Hello,

In dataset df_2008, all columns with country in are converted to a number, when i change name in code to df_2000, this 3 columns are not encoded in numbers "initiator_country" ,"attributing_country" ,
"political_response_country"

i use the following code

df_2000$receiver_country <- lookupcountalliance$index[match(df_2000$receiver_country, lookupcountalliance$countryname)]

df_2000$initiator_country <- lookupcountalliance$index[match(df_2000$initiator_country, lookupcountalliance$countryname)]

df_2000$attributing_country <- lookupcountalliance$index[match(df_2000$attributing_country, lookupcountalliance$countryname)]

df_2000$political_response_country <- lookupcountalliance$index[match(df_2000$political_response_country, lookupcountalliance$countryname)]

df_2000$attributed_initiator_country <- lookupcountalliance$index[match(df_2000$attributed_initiator_country, lookupcountalliance$countryname)]

does someone sees where the problem arises? I do not find where i can upload the datasets, excuse me.

Kind regards,

Nobel

A handy way to supply data is to use the dput() function. Do dput(mydata) where "mydata" is the name of your dataset.y For really large datasets probably dput(head(mydata, 100) will do. Paste it here between

```

```