From: David Kane
Perhaps I am being thick, but I can not figure out how to force read.table to
> version
> read.table("temp.txt", header = TRUE, sep = ",")
Note that "sedol" is really a character string (it is an international
Thanks,
Dave Kane
This archive was generated by hypermail 2.1.3
: Wed 10 Mar 2004 - 08:18:19 EST
Date: Wed 11 Jul 2001 - 22:35:44 EST
Message-id: <15180.18464.584605.914004@gargle.gargle.HOWL>
treat as character something that "looks" numeric to it. Here is a simple example:
_
platform sparc-sun-solaris2.6
arch sparc
os solaris2.6
system sparc, solaris2.6
status
major 1
minor 3.0
year 2001
month 06
day 22
language R
> file.show("temp.txt")
sedol,price
000312,47
071290,112
sedol price
1 312 47
2 71290 112
> read.table("temp.txt", header = TRUE, sep = ",", as.is = TRUE)
sedol price
1 312 47
2 71290 112
>
identifier for stocks) while price is numeric. How can I get read.table to
create sedol as character (and therefore keep around the leading zeroes)? I
guess that I am looking for an option like "what" from scan . . .
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._