Ben Pfaff [Sun, 4 May 2014 18:45:22 +0000 (11:45 -0700)]
CROSSTABS: Add tests for Pearson's R, and update documentation.
PSPP seems to calculate Pearson's R values correctly, despite the
documentation that said otherwise. I don't have any remaining notes for
why the documentation said this, so I'm removing the claim that PSPP does
not calculate Pearson's R correctly.
John Darrington [Sat, 26 Apr 2014 05:33:08 +0000 (07:33 +0200)]
FREQUENCIES: Fixed crash showing histograms of limited range.
We had been using Freedman-Diaconis rule to select the bin width.
According to the literature this is better than Sturges rule.
However it cannot work when the interquartile range is zero, which
will happen for datasets with small range.
This change uses the Freedman-Diaconis rule and falls back to
Sturges when the IQR is zero.
Ben Pfaff [Fri, 4 Apr 2014 04:59:47 +0000 (21:59 -0700)]
psppire-syntax-window: Recode file from final encoding, not original one.
When syntax_load() reads a syntax file, it can guess the correct encoding
using encoding_guess_whole_file(). When it does that, it's supposed to
use the guessed encoding to recode the file data into UTF-8. In fact, it
was using the original (NULL or "") encoding, which didn't work out well.
This commit makes it use the guessed encoding.
John Darrington [Sat, 29 Mar 2014 07:12:43 +0000 (08:12 +0100)]
T-TEST: Fixed a bug in reporting the independent samples std err of the difference
The standard error of the difference and the confidence interval
for the unequal variances case was reported where the equal variances
case should have been. This change fixes that.
Reported by: Michael Schneider <m-schneider.klh@uni-wuerzburg.de>
Ben Pfaff [Sun, 9 Mar 2014 23:01:25 +0000 (16:01 -0700)]
line-reader: Fix bad math when size_t is bigger than off_t.
When size_t is bigger than off_t, pos - r->length will end up very large,
instead of negative, when r->length > pos, so the MAX didn't help to get
rid of negative values. I'm not sure that this should really happen in
practice, but it's better to avoid it.
John Darrington [Sat, 22 Feb 2014 14:07:31 +0000 (15:07 +0100)]
Fixed bug importing ODS files.
There was a typo which caused the import of ODS files in the gui to
not properly function. This change fixes the typo, but also re-arranges
the code such that similar errors are less likely to go unnoticed in the
future. It also brings the code more in concord with the GNU Coding
Standards (which were written that way exactly to prevent these errors).
John Darrington [Fri, 21 Feb 2014 09:06:00 +0000 (10:06 +0100)]
Replace syntactical keywords in error/warning messages by printf directives.
A number of translators are still making the mistake of translating syntax
keywords in messages (such as "REPEAT") into thier literal equivalents in
the target language. This change avoids the posibility of that mistake,
by removing the keywords from the translatable string.
Ben Pfaff [Thu, 20 Feb 2014 16:33:21 +0000 (08:33 -0800)]
sys-file-reader: Don't skip "too many value labels" test anymore.
Previously the maximum number of value labels depended on the size of
size_t, so that it was impossible to have too many on 64-bit systems, but
a recent change made the maximum number of value labels depend on the
size of unsigned int instead, so now 32- and 64-bit systems are the same.
This commit reverts the code that skips the test.
Ben Pfaff [Mon, 17 Feb 2014 05:28:26 +0000 (21:28 -0800)]
data-out: Avoid excessive spaces in data_out_stretchy() output.
By formatting all numbers with width 40, the output almost always began
with a long string of spaces. That tended to stretch out table cells.
This commit fixes the problem.
Ben Pfaff [Sun, 9 Feb 2014 21:26:32 +0000 (13:26 -0800)]
sys-file-reader: Break reading a system file into two stages.
This paves the way to add a way to obtain strings from the system file, to
allow to more intelligently offer users a choice of encodings, by allowing
a client to open a system file before deciding what encoding should be
used to decode it.
Ben Pfaff [Sun, 16 Feb 2014 07:11:56 +0000 (23:11 -0800)]
sys-file-reader: Get rid of longjmp().
longjmp() makes code harder to understand, and I was finding its
usage here was making it harder for me to make reasonable changes
to the system file reader.
Ben Pfaff [Sun, 16 Feb 2014 07:06:13 +0000 (23:06 -0800)]
pspp-dump-sav: More gracefully handle empty multiple response sets.
Some multiple response sets have no variables, although I don't know why,
and pspp-dump-sav is more useful if it doesn't stop reading when it arrives
at one.
Ben Pfaff [Tue, 4 Feb 2014 05:37:53 +0000 (21:37 -0800)]
Change many %g format specifiers to %.*g with precision DBL_DIG + 1.
The high precision should ensure that in most cases the value is formatted
with enough digits to fully express the internal precision. Without this
change, %g by itself only expresses 6 digits of precision, so that an
integer value like 99999999 is formatted as 1e8. This fixes the problem.
This commit adds a test to MISSING VALUES because this was in particular
reported as a problem.
Thanks to Andre Müller <Andre.Mueller@gesis.org> for reporting this issue.