One way you can try to deal with mixed type variables is to use the VVALUEX() function. That will allow you to pass a string with the NAME of a variable and get back a string with the VALUE of the variable. You can then use the INPUT() function to convert that string into a number.
So something like this will convert the data in to name/value pairs dataset that is actually LONG.
data actually_long;
row+1;
set new;
length day 8 name $32 value 8 ;
do day=0,3,7;
do name='FruitWt','Color','Rind','Button','Wtloss';
value = input(vvaluex(cats('Day',day,'_',name)),32.);
output;
end;
end;
drop Day0_: Day3_: Day7_: ;
run;
Then if you want you could use PROC TRANSPOSE to make your sort of long dataset.
proc transpose data=actually_long out=sort_of_long;
by row day;
id name;
var value;
run;
Note: You can add the ?? modifier to the informat used in the INPUT() function call to suppress the notes in the log about invalid values such "NA" that might have been what caused the variables to be made as character.
value = input(vvaluex(cats('Day',day,'_',name)),??32.);
... View more