[Rd] read.table (PR#1227)
possolo@crd.ge.com
possolo@crd.ge.com
Tue, 25 Dec 2001 22:45:48 +0100 (MET)
Full_Name: Antonio Possolo
Version: 1.4.0
OS: Linux
Submission from: (NULL) (24.25.141.205)
## inputFile has the following three lines (each without the initial ``## '')
## a,b
## m,1
## n,3
## and resides in $HOME/R
fileHOME <- paste(Sys.getenv("HOME"), "/R/", sep="")
fileNAME <- "inputFile"
## Given the command,
z <- read.table(file=paste(fileHOME, fileNAME, sep=""), sep=",",
header=TRUE, row.names=NULL, as.is=TRUE)
## R replies
## stack imbalance in internal type.convert,
## 28 then 27stack imbalance in .Internal, 27 then 26
## stack imbalance in if, 21 then 20
## stack imbalance in <-, 19 then 18
## stack imbalance in {, 17 then 16
## stack imbalance in for, 10 then 9
## stack imbalance in {, 8 then 7
## stack imbalance in <-, 2 then 1
## Error: unprotect(): stack imbalance
## but z is correct.
## The command
z <- read.table(file=paste(fileHOME, fileNAME, sep=""), sep=",",
header=TRUE, row.names=NULL, as.is=TRUE,
colClasses=c("character", "numeric"))
## produces the same result without complaints.
## Finally, the command
z <- read.table(file=paste(fileHOME, fileNAME, sep=""), sep=",",
header=TRUE, row.names=NULL, as.is=FALSE)
## also produces a data-frame with the correct elements,
## but z$a is a factor, not a character vector.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._