This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
en:create:functions:valuesum [20.01.2015 17:40] – created alexander.ritter | en:create:functions:valuesum [24.01.2015 16:20] – [valueSum()] alexander.ritter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== valueSum() ====== | ====== valueSum() ====== | ||
- | '' | + | '' |
- | '' | + | '' |
- | '' | + | '' |
- | Berechnet die Summe der Antwortcodes für alle Items einer Frage (z.B. einer Skala), für ausgewählte Items oder für eine Liste von Variablen. | + | Calculates the sum of the answer codes for all items in a question |
- | * //Frage// -- Die Kennung einer Frage (als String) | + | * //question// -- ID of a question |
- | * //Items// -- Eine Liste (String oder Array) von Items, z.B. | + | * //items// -- A list (string or array) of items e.g. |
* '' | * '' | ||
* ''' | * ''' | ||
- | * //Variablen// -- Eine Liste (Array) von Variablen-Kennungen entsprechend der **Variablen-Übersicht**, z.B. | + | * //variables// -- A list (array) of variable IDs, as stated in the **Variables Overview** e.g. |
* '' | * '' | ||
- | ===== Beispiele | + | ===== Examples |
- | Summe über alle Antworten | + | Calculate the sum of all responses |
<code php> | <code php> | ||
Line 24: | Line 24: | ||
</ | </ | ||
- | Summe über die Items 2, 4, 6 und 8 der Skala AB01. | + | Sum of items 2, 4, 6 and 8 in scale AB01. |
<code php> | <code php> | ||
$sum = valueSum(' | $sum = valueSum(' | ||
</ | </ | ||
- | Summe über die ersten | + | Sum of the first 4 items in scale AB01. |
<code php> | <code php> | ||
$sum = valueSum(' | $sum = valueSum(' | ||
</ | </ | ||
- | Summe über die Antworten | + | Sum of the responses |
<code php> | <code php> | ||
$sum = valueSum(array(' | $sum = valueSum(array(' | ||
</ | </ | ||
- | Derselbe Befehl nochmal etwas übersichtlicher | + | The same command written a little more clearly: |
<code php> | <code php> | ||
$sum = valueSum( | $sum = valueSum( |