Thank you for your response.
Example with my own file.
.freq castem;
castem
-----------
N
-----------
1 153
2 150
3 632
-----------
Total 935
-----------
.select castem<>3 do;
Selecting, please wait...
(303 of 935 selected)
.begin; ==> No operative (idem begin without < ; >)
ERROR: Line 1: Syntax error at pos 7:
ERROR: Unexpected end of line!
Perhaps a ";" is missing?
.freq castem; ==> no selection...
castem
-----------
N
-----------
1 153
2 150
3 632
-----------
Total 935
-----------
.select castem=1 do drop data; ==> objective : keep codage 1
Selecting, please wait...
(153 of 935 selected)
(153 observations dropped)
.freq castem; ==> Selection code<> 1 (link avec drop data ?)
castem
-----------
N
-----------
2 150
3 632
-----------
Total 782
-----------
And an another (and last) question : how to delete the current selection?
Thank you.
Bernard Branger, Nantes, France
Try this:
freq castem; select castem<>3 do freq castem;
The selection is only used for the statement following ‘do’. If you want to keep it for a few statements, use ‘do begin;’ with ‘end;’
count; // all records select castem <> 3 do count; // subset of records count; // all records again
select castem <> 3 do drop data; count; // all statements from here on will use only the subset of records save “subset.epx”; new dataset with subset of records
The change in operation of the select command promotes clearer programming. With the persistent select command in EpiData classic, it was easy to forget to do
select;
to clear the selection.
Jamie
On Feb 8, 2021, at 6:05 AM, EpiData development and support epidata-list@lists.umanitoba.ca wrote:
Thank you for your response.
Example with my own file.
.freq castem;
castem
N
1 153 2 150 3 632
Total 935
.select castem<>3 do;
Selecting, please wait...
(303 of 935 selected)
.begin; ==> No operative (idem begin without < ; >)
ERROR: Line 1: Syntax error at pos 7:
ERROR: Unexpected end of line!
Perhaps a ";" is missing?
.freq castem; ==> no selection...
castem
N
1 153 2 150 3 632
Total 935
.select castem=1 do drop data; ==> objective : keep codage 1
Selecting, please wait...
(153 of 935 selected)
(153 observations dropped)
.freq castem; ==> Selection code<> 1 (link avec drop data ?)
castem
N
2 150 3 632
Total 782
And an another (and last) question : how to delete the current selection?
Thank you.
Bernard Branger, Nantes, France
EpiData-list mailing list EpiData-list@lists.umanitoba.ca http://lists.umanitoba.ca/mailman/listinfo/epidata-list
participants (1)
-
EpiData development and support