[18911] in s-news-athena
Re: [S] S-PLUS 2000 problem
daemon@ATHENA.MIT.EDU (Dave Krantz)
Tue Aug 10 19:03:53 1999
Date: Tue, 10 Aug 1999 18:59:04 -0400 (EDT)
From: Dave Krantz <dhk@paradox.psych.columbia.edu>
Message-Id: <199908102259.SAA14048@paradox.psych.columbia.edu>
To: GibiansL@globomax.com
Cc: dhk@paradox.psych.columbia.edu, s-news@wubios.wustl.edu
I believe that the difficulties you are encountering come from
the fact that, as the documentation for data.frame() tells you,
"non-numeric vectors are coerced to be factors...". This includes
logical vectors. As the documentation also points out, this
behavior can be suppressed by using the identity function I(),
that is,
test.data <- data.frame(a=I(T), b=I(T), c=I(F))
will lead to a 1 x 3 data frame in which each column is logical;
if you leave out the I(), each column is a factor, so 'TRUE'
becomes '"TRUE"', etc.
Whether this default behavior for data.frame() is sensible has
been debated previously. It suits some people, not others.
You could change it, perhaps with considerable trouble.
Dave Krantz
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news