[R] Difference in 'read.table' between R.1.4.1 and R1.5.0

james.holtman@convergys.com james.holtman at convergys.com
Wed May 8 16:08:53 CEST 2002


This sequence of commands worked fine in R.1.4.1.  The data file was the
same in both instances:

>    acct.log <- read.table(file, col.names=c('cmd', 'user', 'start',
'end',
+         'elapsed', 'sys', 'usr', 'cpu', 'char', 'blocks'),
+         colClasses=c('NA', 'NA', rep('numeric', 7),'integer'),
+         comment.char='')
> version
         _
platform i386-pc-mingw32
arch     x86
os       Win32
system   x86, Win32
status
major    1
minor    4.1
year     2002
month    01
day      30
language R
>


When run under R.1.5.0, I got the following error:

> acct.log <- read.table(file, col.names=c('cmd', 'user', 'start', 'end',
+      'elapsed', 'sys', 'usr', 'cpu', 'char', 'blocks'),
+      colClasses=c('NA', 'NA', rep('numeric', 7),'integer'),
+      comment.char='')
Error: couldn't find function "as"
> version
         _
platform i386-pc-mingw32
arch     i386
os       mingw32
system   i386, mingw32
status
major    1
minor    5.0
year     2002
month    04
day      29
language R
>


There appears to be a call to "as" in read.table, but this object if not
defined:

 for (i in 1:cols) {
        if (known[i])
            next
        data[[i]] <- if (!is.na(colClasses[i]))
            as(data[[i]], colClasses[i])
        else type.convert(data[[i]], as.is = as.is[i], dec = dec)
    }




--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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