
Caution! This message was sent from outside the University of Manitoba.
Thank you, Jamie, your post is very helpful! With my outdated general programming skills I would never have guessed this!
Imif (immediate if), I have used in EpiData classic pgm like this:
count imif $COUNT =0 then type "No data meet criteria in the table" else tab avd bokomm /M endif
Again, BIG thankyou to all EpiData developers who constantly develop this powerful tool, and for all help on this list forum!
Vegard
lør. 15. feb. 2025 kl. 03:55 skrev EpiData support and user community <epidata-list@lists.umanitoba.camailto:epidata-list@lists.umanitoba.ca>: Caution! This message was sent from outside the University of Manitoba.
First of all, thank you for your comments and questions. There are some deficiencies in the help file that need to be addressed.
imif There is no command imif. Was this an Epi Info command? If ... then ... is not documented in the help file for some reason. I'll add it to the next release. Basically if ... then goes like this example:
new global q integer; q := 1; if (q=1) then begin means var1; end else begin scatter var2 var1; end;
Only the means command gets executed. IF is meant to query some global variable, or a result variable, not a data variable.
If you want to perform some calculation on a data variable that depends on another data variable, you can use the iif function or a select
// var1 has values 1 or 0 // var2 is an integer variable, which should be 20 if var1 is 0 and 50 if var1 is 1 var2 := iif(var1 = 0, 20, 50);
Or do it this way
select (var1 = 0) do var2 := 20; select (var1 = 1) do var2 := 50;
Select all records The select command only has effect for the command or block of commands that immediately follow the do. This is an important difference from classic epidata. It also seems that select is not documented, although it does appear in at least one example.
Print titles The graph commands all have a title option, because they open in separate windows or get saved without the context of commands.. For example,
epicurve onsetdate !title:="Salmonella outbreak - cases by date of onset";
The statistical commands do not have a title option, but you can do this with the command ?, which prints anything you want.
?"Table 1. Number of cases by gender and age group"; select (case=1) do tab gender agegroup;
We have been slow getting new releases out. In the queue are some more graph commands; clearly a revised commands.html is needed now.
Jamie On Feb 14, 2025, at 6:14 PM, EpiData support and user community <epidata-list@lists.umanitoba.camailto:epidata-list@lists.umanitoba.ca<mailto:epidata-list@lists.umanitoba.camailto:epidata-list@lists.umanitoba.ca>> wrote:
I have tried to study the Commands file, and I apologize if I overlook something, but: - How do I do Imif - else - endif? - How do I print Titles and comments over tables and graphs? - How to select all records. select; returns error message,
It would be very helpful to see some real-world script files for better understanding structure and flow. Thank you again for your patience!
Vegard
Archives: https://lists.umanitoba.ca/hyperkitty/list/epidata-list@lists.umanitoba.ca/