dropped use of casefiles
[pspp-builds.git] / doc / expressions.texi
index c3a39bbfe17a8aa05f07e960398df8fd49740f5e..b781ec1afc4b6337f9f7cb58a15f623b64ef4f60 100644 (file)
@@ -583,9 +583,9 @@ if @var{padding} does not contain exactly one character.
 @end deftypefn
 
 @cindex strings, trimming
-@cindex whitespace, trimming
+@cindex white space, trimming
 @deftypefn {Function} {} LTRIM (@var{string})
-Returns @var{string}, after removing leading spaces.  Other whitespace,
+Returns @var{string}, after removing leading spaces.  Other white space,
 such as tabs, carriage returns, line feeds, and vertical tabs, is not
 removed.
 @end deftypefn
@@ -644,10 +644,10 @@ or if @var{padding} does not contain exactly one character.
 @end deftypefn
 
 @cindex strings, trimming
-@cindex whitespace, trimming
+@cindex white space, trimming
 @deftypefn {Function} {} RTRIM (@var{string})
 Returns @var{string}, after removing trailing spaces.  Other types of
-whitespace are not removed.
+white space are not removed.
 @end deftypefn
 
 @deftypefn {Function} {} RTRIM (@var{string}, @var{padding})
@@ -1024,19 +1024,26 @@ Returns the year (as an integer 1582 or greater) corresponding to
 @subsection Miscellaneous Functions
 @cindex functions, miscellaneous
 
-Miscellaneous functions take various arguments and produce various
-results.
-
 @cindex cross-case function
 @cindex function, cross-case
-@deftypefn {Function} {} LAG (@var{variable}[, @var{ncases}])
+@deftypefn {Function} {} LAG (@var{variable}[, @var{n}])
 @anchor{LAG}
+
 @var{variable} must be a numeric or string variable name.  @code{LAG}
-results in the value of that variable for the case @var{ncases} before
-the current one.  In case-selection procedures, @code{LAG} results in
-the value of the variable for the last case selected.  Results in
-system-missing (for numeric variables) or blanks (for string
-variables) for the first case or before any cases are selected.
+yields the value of that variable for the case @var{n} before the
+current one.  Results in system-missing (for numeric variables) or
+blanks (for string variables) for the first @var{n} cases.
+
+@code{LAG} obtains values from the cases that become the new active file
+after a procedure executes.  Thus, @code{LAG} will not return values
+from cases dropped by transformations such as @cmd{SELECT IF}, and
+transformations like @cmd{COMPUTE} that modify data will change the
+values returned by @code{LAG}.  These are both the case whether these
+transformations precede or follow the use of @code{LAG}.
+
+If @code{LAG} is used before @cmd{TEMPORARY}, then the values it returns
+are those in cases just before @cmd{TEMPORARY}.  @code{LAG} may not be
+used after @cmd{TEMPORARY}.
 
 If omitted, @var{ncases} defaults to 1.  Otherwise, @var{ncases} must
 be a small positive constant integer.  There is no explicit limit, but
@@ -1123,7 +1130,7 @@ The individual distributions are described individually below.
 
 The following continuous distributions are available:
 
-@deftypefn {Function} {} PDF.BETA (@var{x}
+@deftypefn {Function} {} PDF.BETA (@var{x})
 @deftypefnx {Function} {} CDF.BETA (@var{x}, @var{a}, @var{b})
 @deftypefnx {Function} {} IDF.BETA (@var{p}, @var{a}, @var{b})
 @deftypefnx {Function} {} RV.BETA (@var{a}, @var{b})
@@ -1377,7 +1384,7 @@ Constraints: @var{a} > 0, @var{b} > 0, @var{x} >= 0, 0 <= @var{p} < 1.
 
 The following discrete distributions are available:
 
-@deftypefn {Function} {} PDF.BERNOULLI (@var{x}
+@deftypefn {Function} {} PDF.BERNOULLI (@var{x})
 @deftypefnx {Function} {} CDF.BERNOULLI (@var{x}, @var{p})
 @deftypefnx {Function} {} RV.BERNOULLI (@var{p})
 Bernoulli distribution with probability of success @var{p}.