[R] Still missing something on missing values...
Matej Cepl
matej at ceplovi.cz
Sun Oct 27 02:16:21 CEST 2002
On Sun, Oct 27, 2002 at 01:11:45AM +0200, Peter Dalgaard BSA wrote:
> The length(data$CP1[data$CP1=="Rf"]) construction is unsound (what
> happens if there are NA in the indexing variable?) and you'd be better
> off with sum(data$CP1 %in% "Rf") or simply table(data$CP1), but that
> seems unrelated here.
I knew, that there are non, but of course you are right, that
your construction is more robust. Unfortunately, I have not heard
about %in% operator before :-).
> As you say, your cp1.pdf is perfectly in accordance with the R output,
> whereas cp1-whole_data.pdf differs. It also includes the rather
> extraordinary claim that 979+27=1005 !! Is there any chance you may
> have accidentally modified it?
No, I have just print out to the file from the SPSS report
program (I can send you the report in the original .spo file, if
it is of any worth to you) to the file through Apple Laserwriter
Windows NT driver and then via GSView created PDF file. I have
really low meaning about the Microsoft's printer drivers, but I
do not suppose, that they would change a value in the printed
table :-).
I totally missed the claim, that 979+27=1005, but yes it is
there. Wow! We have to have something in our family (my wife
after first using TeX found a mistake in the Windows
distribution, which caused a postponement of the release of the
TeXLive 7 for a couple of weeks :-). I could not believe that I
have found a bug in so venerable program as SPSS is. :-)
> [If your instructor still insists that SPSS must be right, and this
> really is what it gives as output, I'd point out the obvious
> discrepancies with itself and with the data set with just the CP1
> variable in it, leaving R out of the discussion...]
I will immediately do it.
> What is ICPSR, btw?
Inter-University Consortium for Political and Social Research,
which provides _a huge_ (and more or less free) bank of data for
social sciences. Check it out at http://www.icpsr.umich.edu
(unfortunately, the server seems to be down today).
Thanks a lot for help,
Matej
--
Matej Cepl, matej at ceplovi.cz, PGP ID# D96484AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
As with the Christian religion, the worst advertisement for
Socialism is its adherents.
-- George Orwell
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list