Add support for reading and writing SPV files.
[pspp] / doc / data-io.texi
index a5ba26f0186eace4fed20f708ae4f9b802916c71..9341a58c8a794a06edf59cf1c9615b546dd38220 100644 (file)
@@ -1,3 +1,12 @@
+@c PSPP - a program for statistical analysis.
+@c Copyright (C) 2017 Free Software Foundation, Inc.
+@c Permission is granted to copy, distribute and/or modify this document
+@c under the terms of the GNU Free Documentation License, Version 1.3
+@c or any later version published by the Free Software Foundation;
+@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+@c A copy of the license is included in the section entitled "GNU
+@c Free Documentation License".
+@c
 @c (modify-syntax-entry ?_ "w")
 @c (modify-syntax-entry ?' "'")
 @c (modify-syntax-entry ?@ "'")
@@ -966,10 +975,11 @@ active dataset.
 @display
 MATRIX DATA
         VARIABLES = @var{columns}
-        [eFILE='@var{file_name}'| INLINE @}
+        [FILE='@var{file_name}'| INLINE @}
         [/FORMAT= [@{LIST | FREE@}]
                   [@{UPPER | LOWER | FULL@}]
                   [@{DIAGONAL | NODIAGONAL@}]]
+        [/N= @var{n}]
         [/SPLIT= @var{split_variables}].
 @end display
 
@@ -1049,6 +1059,40 @@ single line.  If you pass the keyword @var{FREE} to @subcmd{FORMAT}
 then the data may be data for several matrix rows may be specified on
 the same line, or a single row may be split across lines.
 
+The @subcmd{N} subcommand may be used to specify the number
+of valid cases for each variable.  It should not be used if the
+data contains a record whose ROWTYPE_ column is @samp{N} or @samp{N_VECTOR}.
+It implies a @samp{N} record whose values are all @var{n}.
+That is to say,
+@example
+matrix data
+    variables = rowtype_  var01 TO var04
+    /format = upper nodiagonal
+    /n = 99.
+begin data
+mean 34 35 36 37
+sd   22 11 55 66
+corr 9 8 7
+corr 6 5
+corr 4
+end data.
+@end example
+produces an effect identical to
+@example
+matrix data
+    variables = rowtype_  var01 TO var04
+    /format = upper nodiagonal
+begin data
+n    99 99 99 99
+mean 34 35 36 37
+sd   22 11 55 66
+corr 9 8 7
+corr 6 5
+corr 4
+end data.
+@end example
+
+
 The @subcmd{SPLIT} is used to indicate that variables are to be
 considered as split variables.  For example, the following
 defines two matrices using the variable @samp{S1} to distinguish