Greg Snow wrote:
> It looks like your original data may be tab seperated, if that is the case
> then just use read.delim or use sep='\t' in read.table or scan.
>
I think that was only half the problem. If you do that, you end up with
one column containing both City and State, comma-separated. P
vid Arnold
> > Sent: Friday, June 13, 2008 5:15 PM
> > To: r-help@r-project.org
> > Subject: [R] Importing data with different delimters
> >
> > All,
> >
> > I have a data file with 56 entries that looks like this:
> >
> > City State JanT
e-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David Arnold
> Sent: Friday, June 13, 2008 5:15 PM
> To: r-help@r-project.org
> Subject: [R] Importing data with different delimters
>
> All,
>
> I have a data file with 56 entries that looks like this:
Assuming that the only problem is the blank in the city names, here is
one way of doing it:
> inFile <- textConnection("City State JanTemp Lat Long
+ Mobile, AL 44 31.288.5
+ Montgomery, AL 38 32.986.8
+ Phoenix, AZ 35 33.6112.5
+ Little Rock, AR 31
All,
I have a data file with 56 entries that looks like this:
City State JanTemp Lat Long
Mobile, AL 44 31.288.5
Montgomery, AL 38 32.986.8
Phoenix, AZ 35 33.6112.5
Little Rock, AR 31 35.492.8
Los Angeles, CA 47 34.3118.7
San Franci
5 matches
Mail list logo