[gnumeric] Expand the description of SSMEDIAN. [#647247]



commit ba5045e4b4b03113a1003ed4f7e527df3af7413e
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Sat Apr 9 11:16:06 2011 -0600

    Expand the description of SSMEDIAN. [#647247]
    
    2011-04-08 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* functions.c (help_ssmedian): expand the description. [#647247]
    
    2011-04-09  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* func.defs: update
    	* functions.xml: update

 NEWS                        |    1 +
 doc/C/ChangeLog             |    5 +++++
 doc/C/func.defs             |   18 ++++++++++++++++--
 doc/C/functions.xml         |   40 ++++++++++++++++++++++++++++++++++++++--
 plugins/fn-stat/ChangeLog   |    4 ++++
 plugins/fn-stat/functions.c |   22 ++++++++++++++++------
 6 files changed, 80 insertions(+), 10 deletions(-)
---
diff --git a/NEWS b/NEWS
index 458c319..270c1ee 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.10.15
 
 Andreas:
 	* Fix shift-arrow movement for sheet objects. [#645805]
+	* Expand the description of SSMEDIAN. [#647247]
 
 Morten:
 	* Fix problems with localized function docs.
diff --git a/doc/C/ChangeLog b/doc/C/ChangeLog
index 154a121..c01d9ba 100644
--- a/doc/C/ChangeLog
+++ b/doc/C/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-09  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* func.defs: update
+	* functions.xml: update
+
 2011-03-24  Morten Welinder <terra gnome org>
 
 	* Release 1.10.14
diff --git a/doc/C/func.defs b/doc/C/func.defs
index 347d8e1..a3d1112 100644
--- a/doc/C/func.defs
+++ b/doc/C/func.defs
@@ -1378,6 +1378,14 @@ The depreciation coefficient used is:
 @SEEALSO=AMORDEGRC
 
 @CATEGORY=Finance
+ FUNCTION=ATL_LAST
+ SHORTDESC=sample real-time data source
+ SYNTAX=ATL_LAST(tag)
+ ARGUMENTDESCRIPTION=@{tag}: tag to watch
+ DESCRIPTION=ATL_LAST is a sample implementation of a real time data source.  It takes a string tag and monitors the named pipe ~/atl for changes to the value of that tag.
+ NOTE=This is not intended to be generally enabled and is OFF by default.
+
+ CATEGORY=Finance
 @FUNCTION=COUPDAYBS
 @SHORTDESC=number of days from coupon period to settlement
 @SYNTAX=COUPDAYBS(settlement,maturity,frequency,basis,eom)
@@ -5538,8 +5546,14 @@ If the data set does not contain any duplicates this function returns a #N/A err
 @SYNTAX=SSMEDIAN(array,interval)
 @ARGUMENTDESCRIPTION= {array}: data set
 @{interval}: length of each grouping interval, defaults to 1
- DESCRIPTION=The data points given in @{array} are assumed to be the result of grouping data into intervals of length @{interval}
- NOTE=If @{array} is empty, this function returns a #NUM! error. If @{interval} <= 0, this function returns a #NUM! error.SSMEDIAN does not check whether the data points are at least @{interval} apart.
+ DESCRIPTION=The data is assumed to be grouped into intervals of width @{interval}. Each data point in @{array} is the midpoint of the interval containing the true data value. The median is calculated by interpolation within the median interval (the interval containing the median value), assuming that the true values within that interval are distributed uniformly:
+median = L + @{interval}*(N/2 - CF)/F
+where:
+L = the lower limit of the median interval
+N = the total number of data points
+CF = the number of data points below the median interval
+F = the number of data points in the median interval
+ NOTE=If @{array} is empty, this function returns a #NUM! error. If @{interval} <= 0, this function returns a #NUM! error. SSMEDIAN does not check whether the data points are at least @{interval} apart.
 @SEEALSO=MEDIAN
 
 @CATEGORY=Statistics
diff --git a/doc/C/functions.xml b/doc/C/functions.xml
index aa4fd7f..a3743af 100644
--- a/doc/C/functions.xml
+++ b/doc/C/functions.xml
@@ -4773,6 +4773,36 @@
       </para>
       </refsect1>
     </refentry>
+    <refentry id="gnumeric-ATL_LAST">
+      <refmeta>
+        <refentrytitle>
+          <function>ATL_LAST</function>
+        </refentrytitle>
+      </refmeta>
+      <refnamediv>
+        <refname>
+          <function>ATL_LAST</function>
+        </refname>
+        <refpurpose>
+        sample real-time data source
+      </refpurpose>
+      </refnamediv>
+      <refsynopsisdiv>
+        <synopsis><function>ATL_LAST</function>(<parameter>tag</parameter>)</synopsis>
+      </refsynopsisdiv>
+      <refsect1>
+        <title>Arguments</title>
+        <para><parameter>tag</parameter>: tag to watch</para>
+      </refsect1>
+      <refsect1>
+        <title>Description</title>
+        <para><function>ATL_LAST</function> is a sample implementation of a real time data source.  It takes a string tag and monitors the named pipe ~/atl for changes to the value of that tag.</para>
+      </refsect1>
+      <refsect1>
+        <title>Note</title>
+        <para>This is not intended to be generally enabled and is OFF by default.</para>
+      </refsect1>
+    </refentry>
     <refentry id="gnumeric-COUPDAYBS">
       <refmeta>
         <refentrytitle>
@@ -18993,11 +19023,17 @@
       </refsect1>
       <refsect1>
         <title>Description</title>
-        <para>The data points given in <parameter>array</parameter> are assumed to be the result of grouping data into intervals of length <parameter>interval</parameter></para>
+        <para>The data is assumed to be grouped into intervals of width <parameter>interval</parameter>. Each data point in <parameter>array</parameter> is the midpoint of the interval containing the true data value. The median is calculated by interpolation within the median interval (the interval containing the median value), assuming that the true values within that interval are distributed uniformly:</para>
+        <para>median = L + <parameter>interval</parameter>*(N/2 - CF)/F</para>
+        <para>where:</para>
+        <para>L = the lower limit of the median interval</para>
+        <para>N = the total number of data points</para>
+        <para>CF = the number of data points below the median interval</para>
+        <para>F = the number of data points in the median interval</para>
       </refsect1>
       <refsect1>
         <title>Note</title>
-        <para>If <parameter>array</parameter> is empty, this function returns a #NUM! error. If <parameter>interval</parameter> &lt;= 0, this function returns a #NUM! error.<function>SSMEDIAN</function> does not check whether the data points are at least <parameter>interval</parameter> apart.</para>
+        <para>If <parameter>array</parameter> is empty, this function returns a #NUM! error. If <parameter>interval</parameter> &lt;= 0, this function returns a #NUM! error. <function>SSMEDIAN</function> does not check whether the data points are at least <parameter>interval</parameter> apart.</para>
       </refsect1>
       <refsect1>
         <title>See also</title>
diff --git a/plugins/fn-stat/ChangeLog b/plugins/fn-stat/ChangeLog
index 0dd4c97..041091c 100644
--- a/plugins/fn-stat/ChangeLog
+++ b/plugins/fn-stat/ChangeLog
@@ -1,5 +1,9 @@
 2011-04-08 Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* functions.c (help_ssmedian): expand the description. [#647247]
+
+2011-04-08 Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* functions.c (gnumeric_ssmedian): fix typo
 	
 2011-03-24  Morten Welinder <terra gnome org>
diff --git a/plugins/fn-stat/functions.c b/plugins/fn-stat/functions.c
index 4fb3568..9d17560 100644
--- a/plugins/fn-stat/functions.c
+++ b/plugins/fn-stat/functions.c
@@ -2051,17 +2051,27 @@ gnumeric_median (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
 /***************************************************************************/
 
 static GnmFuncHelp const help_ssmedian[] = {
-	{ GNM_FUNC_HELP_NAME, F_("SSMEDIAN:median for grouped data as commonly determined in the social sciences")},
+	{ GNM_FUNC_HELP_NAME, F_("SSMEDIAN:median for grouped data")},
 	{ GNM_FUNC_HELP_ARG, F_("array:data set")},
 	{ GNM_FUNC_HELP_ARG, F_("interval:length of each grouping interval, defaults to 1")},
-	{ GNM_FUNC_HELP_DESCRIPTION, F_("The data points given in @{array} are assumed to be the result of "
-	   "grouping data into intervals of length @{interval}") },
+	{ GNM_FUNC_HELP_DESCRIPTION, F_("The data are assumed to be grouped into intervals of width @{interval}. "
+					"Each data point in @{array} is the midpoint of the interval containing the true value. "
+					"The median is calculated by interpolation within the median interval "
+					"(the interval containing the median value), "
+					"assuming that the true values within that interval are distributed uniformly:\n"
+					"median = L + @{interval}*(N/2 - CF)/F\n"
+					"where:\n"
+					"L = the lower limit of the median interval\n"
+					"N = the total number of data points\n"
+					"CF = the number of data points below the median interval\n"
+					"F = the number of data points in the median interval") },
 	{ GNM_FUNC_HELP_NOTE, F_("If @{array} is empty, this function returns a #NUM! error.") },
-	{ GNM_FUNC_HELP_NOTE, F_("If @{interval} <= 0, this function returns a #NUM! error."
+	{ GNM_FUNC_HELP_NOTE, F_("If @{interval} <= 0, this function returns a #NUM! error. "
 	   "SSMEDIAN does not check whether the data points are "
 	   "at least @{interval} apart.") },
-	{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, A3 contain numbers 7, 8, 8.") },
-	{ GNM_FUNC_HELP_EXAMPLES, F_("Then SSMEDIAN(A1:A3, 1) equals 7.75.") },
+	{ GNM_FUNC_HELP_EXAMPLES, "=SSMEDIAN(ARRAY(7,7,8,9), 1)" },
+	{ GNM_FUNC_HELP_EXAMPLES, "=SSMEDIAN(ARRAY(7,7,8,8,9), 1)" },
+	{ GNM_FUNC_HELP_EXAMPLES, "=SSMEDIAN(ARRAY(7,7,8,8,8,9), 1)" },
 	{ GNM_FUNC_HELP_SEEALSO, "MEDIAN"},
 	{ GNM_FUNC_HELP_END }
 };



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]