REGRESSION: Implement /ORIGIN subcommand.
[pspp] / src / language / stats / factor.c
index 49bc8a4d67f5334fa4af3737edd99b1d4c368acd..c1ce93aaec3fbbcce445875187862b6e4e607a37 100644 (file)
@@ -1467,6 +1467,12 @@ cmd_factor (struct lexer *lexer, struct dataset *ds)
   if (factor.n_vars < 2)
     msg (MW, _("Factor analysis on a single variable is not useful."));
 
+  if (factor.n_vars < 1)
+    {
+      msg (ME, _("Factor analysis without variables is not possible."));
+      goto error;
+    }
+
   if (matrix_reader)
     {
       struct idata *id = idata_alloc (factor.n_vars);
@@ -2191,7 +2197,7 @@ do_factor (const struct cmd_factor *factor, struct casereader *r)
   struct idata *idata = idata_alloc (factor->n_vars);
 
   idata->cvm = covariance_1pass_create (factor->n_vars, factor->vars,
-                                             factor->wv, factor->exclude);
+                                       factor->wv, factor->exclude, true);
 
   for ( ; (c = casereader_read (r) ); case_unref (c))
     {