Hi there,
i'm trying to merge 4 datasets: baseline, month, year and endpoint by ID. i've sorted each dataset by ID but when i try to merge i get the error message:
variable has been defined as both character and numeric.
i don't really understand that error. i think it would be best to change it to a numeric type if it's asking me to choose between the two. but i'm not too sure how to do that either.
I then tried the RENAME function and tested that out by merging just baseline and year:
data baselineyear;
merge baseline
year (rename=(SBPC=YRSBPC DBPC=YDBPC HRC=YRHRC SBPA=YRSBPA DBPA=YRDBPA HRA=YRHRA));
by id;
run;
when i then used proc print to see if it worked, none of the numeric values showed, just the missing values which were '.' any numeric values in my excel sheet turned up as a blank space ' ' in proc print.
i'm really stumped and can't proceed forward until i've successfully merged all 4 datasets. Can anyone help me and tell me what statements/commands i need to use?
I've got a link below to the excel file, if by chance it doesn't work, my email is missdoobiwhatsit@yahoo.com
i'm trying to merge 4 datasets: baseline, month, year and endpoint by ID. i've sorted each dataset by ID but when i try to merge i get the error message:
variable has been defined as both character and numeric.
i don't really understand that error. i think it would be best to change it to a numeric type if it's asking me to choose between the two. but i'm not too sure how to do that either.
I then tried the RENAME function and tested that out by merging just baseline and year:
data baselineyear;
merge baseline
year (rename=(SBPC=YRSBPC DBPC=YDBPC HRC=YRHRC SBPA=YRSBPA DBPA=YRDBPA HRA=YRHRA));
by id;
run;
when i then used proc print to see if it worked, none of the numeric values showed, just the missing values which were '.' any numeric values in my excel sheet turned up as a blank space ' ' in proc print.
i'm really stumped and can't proceed forward until i've successfully merged all 4 datasets. Can anyone help me and tell me what statements/commands i need to use?
I've got a link below to the excel file, if by chance it doesn't work, my email is missdoobiwhatsit@yahoo.com