SET MXWARNS = 0 to be interpreted as unlimited.
[pspp] / src / language / stats / factor.c
index 1043173bfeab6d50b082403e40906a483238d844..d50d6ad3fdf2c5b6eb6c86bbbe3e3044a893f4ac 100644 (file)
@@ -211,6 +211,7 @@ idata_free (struct idata *id)
 }
 
 
+#if 0
 static void
 dump_matrix (const gsl_matrix *m)
 {
@@ -249,6 +250,7 @@ dump_vector (const gsl_vector *v)
     }
   printf ("\n");
 }
+#endif
 
 
 static int 
@@ -1692,6 +1694,12 @@ do_factor (const struct cmd_factor *factor, struct casereader *r)
 
   idata->cov = covariance_calculate (cov);
 
+  if (idata->cov == NULL)
+    {
+      msg (MW, _("The dataset contains no complete observations. No analysis will be performed."));
+      goto finish;
+    }
+
   var_matrix = covariance_moments (cov, MOMENT_VARIANCE);
   mean_matrix = covariance_moments (cov, MOMENT_MEAN);
   idata->n = covariance_moments (cov, MOMENT_NONE);