From btyner at gmail.com  Tue Jun 26 18:23:01 2007
From: btyner at gmail.com (Benjamin Tyner)
Date: Tue, 26 Jun 2007 12:23:01 -0400
Subject: [Rd] possible bug in 'scan'
In-Reply-To: <07E228A5BE53C24CAD490193A7381BBBA5AA87@LP-EXCHVS07.CO.IHC.COM>
References: <5f88b2c50706260858q1bfaa2e0tf62cb0694d01c4c1@mail.gmail.com>
	<07E228A5BE53C24CAD490193A7381BBBA5AA87@LP-EXCHVS07.CO.IHC.COM>
Message-ID: <5f88b2c50706260923n5fbd197q9837be3386a58ea@mail.gmail.com>

How embarrassing -- works like a charm.

On 6/26/07, Greg Snow <Greg.Snow at intermountainmail.org> wrote:
> The what argument looks at what the elements are, not the word they say.
> Try this:
>
> > tmp <- scan("C:/temp.csv",
> >             what=list("",0),
> >             sep=",")
>
> Hope this helps,
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.snow at intermountainmail.org
> (801) 408-8111
>
>
>
> > -----Original Message-----
> > From: r-devel-bounces at r-project.org
> > [mailto:r-devel-bounces at r-project.org] On Behalf Of Benjamin Tyner
> > Sent: Tuesday, June 26, 2007 9:59 AM
> > To: r-devel at r-project.org
> > Subject: [Rd] possible bug in 'scan'
> >
> > R-devel,
> >
> > When I run the following code on the attached file,
> >
> > tmp <- scan("C:/temp.csv",
> >             what=list("character","numeric"),
> >             sep=",")
> >
> > Then tmp[[2]] is a character vector. My impression from the
> > help file is that it should be a numeric as specified by 'what'
> >
> > > sessionInfo()
> > R version 2.5.0 (2007-04-23)
> > i386-pc-mingw32
> >
> > locale:
> > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
> > States.1252;LC_MONETARY=English_United
> > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
> >
> > attached base packages:
> > [1] "stats"     "graphics"  "grDevices" "utils"     "datasets"
> > "methods"   "base"
> >
> > other attached packages:
> >  lattice    gdata
> > "0.15-5"  "2.3.1"
> >
> > My apologies if this is due to my misunderstanding.
> > Ben
> >
>
>



[Rd] possible bug in 'scan'
Benjamin Tyner