R-alpha: R 0.16.1: read.table() problem

Kurt Hornik (hornik@ci.tuwien.ac.at)
Tue, 4 Mar 1997 17:53:43 +0100

Date: Tue, 4 Mar 1997 17:53:43 +0100
Message-Id: <199703041653.RAA05656@aragorn.ci.tuwien.ac.at>
From: Kurt Hornik <hornik@ci.tuwien.ac.at>
To: r-testers@stat.math.ethz.ch
Subject: R-alpha: R 0.16.1:  read.table() problem

Here's a minor remark.

The help text for read.table() says,

          as.is : the default behavior of read.table is to convert
                  non-numeric variables to factors.  The variable
                  as.is controls this conversion.  Its value is
                  either a vector of logicals (VALUES ARE RECYCLED
                  IF NECESSARY), or a vector of numeric indices
                  which specify which columns should be left as
                  character strings.

However, the `recycling' does not happen.  Following our previous
discussions about recycling in general, I am not sure whether this
feature is really wanted ... if so, one needs to replace

        if (is.logical(as.is)) {
                if (length(as.is) == 1) 
                        as.is <- rep(as.is, cols)


	if (is.logical(as.is)) {
          as.is <- rep(as.is, length = cols)

r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch