On 01/08/2012 10:11, delvin008 delta wrote:> Hi, all:
> This is the first time I use mail-list for help and I'm a
student
> from Chinese. So forgive my poor English skill.
> Here is the question: I have an excel file contains some stkcd
> information. The stkcd is a string fill with numbers, e.g
"000002". When i
> use sqlFetch function from RODBC package. It will automatically read stkcd
> as a number, e.g 2 which is truly confusing me. Any suggestions please.
No, it will not. It (like read.table) does so because you asked it to.
See the 'R Data Import/Export Manual' (which has lots of good advice and
should be basic reading for people importing data into R) and the help
for sqlFetch (especially the as.is argument).
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595