Finding Data Citing data
DSS lab consultation schedule
*No appts. necessary during walk-in hrs.
Note: the DSS lab is open as long as Firestone is open, no appointments necessary to use the lab computers for your own analysis.
S-Plus has a very consistent language syntax and many of the basic commands mirror basic unix commands:
Note that all commands in Splus include parentheses (). Sometimes, you'll include things in the parentheses, as you do when you type rm(object). If you're interested in learning a lot more about programming, try typing a function without the parantheses. S-Plus will output the actual function, which may look long and messy.
When you perform a command in S-Plus it does not automatically become an object. Instead, you must "assign" the output to an object. For example, when you read in data, as we will shortly, you need to tell S-Plus to store this data in a particular object. You do this by assigning it to an objectname. Here's an example:
Try typing this now. Then type givemeafive. You should see a five on your screen. The little arrow (<-) means assign 5 to the object givemeafive. Now, lets see what happens when you forget to assign output to a particular object. Try typing:
Wow, that was a lot of output which you probably did not want to go on the screen.
One last thing: <- can be abbreviated as _ (underscore). That makes it easier to type. Now were almost done with the basics.
As was mentioned earlier, Splus is object oriented. Everything you do in Splus will involve creating objects. This includes both data sets and the linear models you create. Here are three types of objects ypou need to know about: