Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
en:create:functions:valuesum [20.01.2015 17:40] – created alexander.ritteren:create:functions:valuesum [24.01.2015 16:20] – [valueSum()] alexander.ritter
Line 1: Line 1:
 ====== valueSum() ====== ====== valueSum() ======
  
-''float **valueSum**(string //Frage//)''+''float **valueSum**(string //question//)''
  
-''float **valueSum**(string //Frage//, string|array //Items//)''+''float **valueSum**(string //question//, string|array //items//)''
  
-''float **valueSum**(array //Variablen//)''+''float **valueSum**(array //variables//)''
  
-Berechnet die Summe der Antwortcodes für alle Items einer Frage (z.Beiner 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 (e.ga scale), for selected items, or for a list of variables.
  
-  * //Frage// -- Die Kennung einer Frage (als String+  * //question// -- ID of a question (as a string
-  * //Items// -- Eine Liste (String oder Arrayvon Items, z.B.+  * //items// -- A list (string or arrayof items e.g.
     * ''array(2,4,6)''     * ''array(2,4,6)''
     * '''1-3,5,7'''     * '''1-3,5,7'''
-  * //Variablen// -- Eine Liste (Arrayvon Variablen-Kennungen entsprechend der **Variablen-Übersicht**, z.B.+  * //variables// -- A list (arrayof variable IDs, as stated in the **Variables Overview** e.g.
     * ''array('AB01_01', 'AB01_02', 'BB01', 'BC01')''     * ''array('AB01_01', 'AB01_02', 'BB01', 'BC01')''
  
-===== Beispiele =====+===== Examples =====
  
-Summe über alle Antworten in der Skala AB01 berechnen.+Calculate the sum of all responses in scale AB01.
  
 <code php> <code php>
Line 24: Line 24:
 </code> </code>
  
-Summe über die Items 2, 4, 6 und der Skala AB01.+Sum of items 2, 4, 6 and in scale AB01.
 <code php> <code php>
 $sum = valueSum('AB01', array(2,4,6,8)); $sum = valueSum('AB01', array(2,4,6,8));
 </code> </code>
  
-Summe über die ersten Items der Skala AB01.+Sum of the first items in scale AB01.
 <code php> <code php>
 $sum = valueSum('AB01', '1-4'); $sum = valueSum('AB01', '1-4');
 </code> </code>
  
-Summe über die Antworten in den Variablen AB01_01, AB01_03 und BB01_02+Sum of the responses in variables AB01_01, AB01_03 and BB01_02
 <code php> <code php>
 $sum = valueSum(array('AB01_01','AB01_03','BB01_02')); $sum = valueSum(array('AB01_01','AB01_03','BB01_02'));
 </code> </code>
  
-Derselbe Befehl nochmal etwas übersichtlicher+The same command written a little more clearly: 
 <code php> <code php>
 $sum = valueSum( $sum = valueSum(
en/create/functions/valuesum.txt · Last modified: 05.09.2023 23:11 by swissel.uni-mannheim
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki