A Tale of Two Numbers: Kindergarten Math On College Software

This page describes how to add two numbers in Quadstat, R and SAS. You can think of this as a "Hello, World!" program. Actually, the story behind this blog post was that I was trying to test if SAS works on my system after renaming the folders that they recommended in the SAS University Edition installation instructions. You can follow this link to my blog post on how to setup SAS University edition.

So far it seems that it is possible to rename the folders (there is a setting to change the default Virtual Machine folder.) So I wanted to test it out. So I entered 1+1; and it gave me a terrible error message. I scoured the web searching for a way to add two numbers in SAS. What I found out is that there are not many pages describing how to add two numbers in SAS (I didn't find any.) I did come across a blog article that helped me along the way though.

So to add two numbers in Quadstat, go to the sum app where you can enter the two addends.

statistics sum app form

Once you click submit, you will get the Webform module submission page.

sum app output statistics

Quadstat can also handle negative and exponential numbers. For a negative number add a minus sign to one or both of the addends. For exponential numbers, use this R syntax: $10{\text e}^2$ which represents the numeral 1000.
R Code

The R code to add two numerals is rather easy. Actually, it's the easiest of all three.


You don't even need the semi-colon if you push enter on the command-line.

SAS Code

proc iml;
sum = SUM(1,1);
print sum;

SAS has a long history dating back to the mainframes of the 60s and 70s as you can see.

sas statistics sum