What have you tried?  Check the Intro manual for hints.

?read.table   probably using sep='\t'

On Thu, May 14, 2009 at 1:30 PM, Sunita22 <sunitap22@gmail.com> wrote:

>
> Hello
>
> I have to import 2 txt files into R. 1 file contains the data and the other
> contains the header, column headings, datatypes and labels for the data.
>
> I have 2 problems:
>
> 1) my data file has mixed type of data e.g. 1 2 3 4 5 3-5 02/04/06 3 4 5
> and
> so on, the data file is tab separated. when I import it, the data is
> getting
> stored in one single variable say V1. I need to separate it into rows and
> columns. how do I this? Which commands in R would be useful for the same?
>
> 2) The other file is also tab separated. the 6 lines contains header and
> introduction as in the name of the dataset, year, etc. and then column
> names
> its datatypes and labels. After importing the data in this file also gets
> stored in one single variable. I need to separate it into rows and columns.
> how do I this? Which commands in R would be useful for the same?
>
> Thank you in advance
>
> Regards
> Sunita
> --
> View this message in context:
> http://www.nabble.com/Importing-data-into-R-and-combining-2-files-tp23545291p23545291.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

	[[alternative HTML version deleted]]


