Hello Everyone,
I have several datasets coming from different studies. My goal is two merge all those datasets into one single dataset.
Some variables in different datasets have the same variable name, so in order to merge the datasets, I need to change the variable names.
I want to change the variable names based on the study they originate. For example, for all variables in the first dataset, I want them to start with 1_variable_name. And the variables from the second dataset, I want them to begin with 2_variable_name. Since I have a lot of variables in the dataset, I was wondering if it is possible to change the variable names with a simple command rather than changing their names one by one. I would highly appreciate your advice on this.
I have several datasets coming from different studies. My goal is two merge all those datasets into one single dataset.
Some variables in different datasets have the same variable name, so in order to merge the datasets, I need to change the variable names.
I want to change the variable names based on the study they originate. For example, for all variables in the first dataset, I want them to start with 1_variable_name. And the variables from the second dataset, I want them to begin with 2_variable_name. Since I have a lot of variables in the dataset, I was wondering if it is possible to change the variable names with a simple command rather than changing their names one by one. I would highly appreciate your advice on this.
Comment