Re: [R] Importing data with different delimters

From: milton ruser <milton.ruser_at_gmail.com>
Date: Mon, 16 Jun 2008 12:35:12 -0300

Hi David,

If the delimier is "tab" try this.

my.df<-read.table("my_file.txt", head=T, sep="\t")

Cheers,
Miltinho
Brazil

>
>
>
> > -----Original Message-----
> > From: r-help-bounces_at_r-project.org
> > [mailto:r-help-bounces_at_r-project.org] On Behalf Of David Arnold
> > Sent: Friday, June 13, 2008 5:15 PM
> > To: r-help_at_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 JanTemp Lat Long
> > Mobile, AL 44 31.2 88.5
> > Montgomery, AL 38 32.9 86.8
> > Phoenix, AZ 35 33.6 112.5
> > Little Rock, AR 31 35.4 92.8
> > Los Angeles, CA 47 34.3 118.7
> > San Francisco, CA 42 38.4 123.0
> >
> > I would like to "read" this data into a dataframe. Is it
> > possible to do without editing the datafile?
> >
> > D.
> >
> > ______________________________________________
> > R-help_at_r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 16 Jun 2008 - 16:52:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 16 Jun 2008 - 17:30:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive