s-news
[Top] [All Lists]

SQL in S-PLUS

To: s-news@lists.biostat.wustl.edu
Subject: SQL in S-PLUS
From: "Heeringa W.J." <heeringa@let.rug.nl>
Date: Fri, 7 Dec 2001 17:45:04 +0100
Dear S-PLUS users,

I would like to make conditional selections and changes in table, like what 
is done with SQL commands, and which is also very well possible in SPSS. For 
example:

I have a table with information of 10 persons. For each person is in the 
first columm noted if he of she drinks alcohol: 1=yes and 2=no. In the second 
column is noted what type of alcohol he or she drinks: 1=wine, 2=beer, 
3=whiskey.

Now I want to perform automatically the following action:

For each person who drinks no alcohol, in the column for the type of alcohol 
the value must be set to 'system missing'. My question: how can this be 
automatically done? And: is some SQL-like selection and changement possible?

--------------------------
Wilbert Heeringa
University of Groningen
Faculty of Arts
Humanities Computing


<Prev in Thread] Current Thread [Next in Thread>