DATA one;
INPUT Type $ Circumference (inch) Height (ft) Crown (ft);
Volume=0.319 * height * 0.0000163 * circumference^2;
DATALINES;
oak, black 222 105 112
hemlock, eastern 149 138 52
ash, white 258 80 70
cherry, black 187 91 75
maple, red 210 99 74
elm, american 229 127 104
;
RUN;
PROC PRINT;
var Volume;
RUN;
Hi
Try the code below. Bedefault the delimter for data items is a blank, so you also need to read the type.
The exponentiation operator in SAS is **
DATA one;
INPUT Type $ type2 $ Circumference Height Crown;
Volume = 0.319 * height * 0.0000163 * circumference**2;
DATALINES;
oak, black 222 105 112
hemlock, eastern 149 138 52
ash, white 258 80 70
cherry, black 187 91 75
maple, red 210 99 74
elm, american 229 127 104
;
PROC PRINT;
RUN;
Bruno
Hi
Try the code below. Bedefault the delimter for data items is a blank, so you also need to read the type.
The exponentiation operator in SAS is **
DATA one;
INPUT Type $ type2 $ Circumference Height Crown;
Volume = 0.319 * height * 0.0000163 * circumference**2;
DATALINES;
oak, black 222 105 112
hemlock, eastern 149 138 52
ash, white 258 80 70
cherry, black 187 91 75
maple, red 210 99 74
elm, american 229 127 104
;
PROC PRINT;
RUN;
Bruno
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.