Hi, I have a doubt. I have a variable named "score" (float) as showed below and I want to truncate it to two decimals. I mean, I have values like 2.666667 and 2.1666667 and I want to generate a new variable that would be these numbers but truncated to two decimals. I want to get, for these examples, 2.66 and 2.16, not rounding. Thanks for your help.
Code:
ID score "00002484" 2.833333 "00002484" 3 "00002484" 3 "00002484" 3 "00003861" 2.3333333 "00003861" 2.3333333 "00003861" 2.25 "00003861" 2.75 "00004010" 2.666667 "00004010" 3 "00004010" 2.75 "00004010" 3 "00005099" 2.1666667 "00005099" 2.5 "00005099" 1.75 "00007848" 2.3333333 "00007848" 2.3333333 "00007848" 1.75 "00007848" 2.5 "00015005" 1.8333334 "00015005" 2.833333 "00015005" 1.25 "00015005" 3 "00020453" 2.1666667
Comment