Try also,

setwd("C:\\")
yourdata=read.table("tzmile.txt",header=TRUE)
attach(yourdata)
yourdata[1:10,]
 warcode      date weeklyrt
1    30001 16-Dec-05  -0.0043
2    30001 23-Dec-05   0.1313
3    30001 30-Dec-05  -0.0844
4    30001  6-Jan-06   0.0097
5    30001 13-Jan-06  -0.1009
6    30001 20-Jan-06  -0.0450
7    30001 25-Jan-06  -0.1700
8    30001 10-Feb-06   0.3060
9    30001 17-Feb-06  -0.0721
10   30001 24-Feb-06   0.2260

HTH,

Jorge



On Thu, Apr 24, 2008 at 3:53 PM, Charles Danko <dankoc@gmail.com> wrote:

> try:
> var <- read.table("weekly.txt", sep="\t", header=TRUE)
>
> Charles
>
> On Thu, Apr 24, 2008 at 3:29 PM, tzsmile <rz2171@yahoo.com> wrote:
> >
> >  i just want to read data from Excel and i copied it and pasted into a
> txt
> >  file.
> >  then i want to use "read.table" to read it. but however i tried, it
> doesn't
> >  work.
> >  can someone help me?
> >  data is attached.
> >  thanks http://www.nabble.com/file/p16851853/weekly.txt weekly.txt
> >  --
> >  View this message in context:
> http://www.nabble.com/a-simple-question-of-importing-data-tp16851853p16851853.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
> >  and provide commented, minimal, self-contained, reproducible code.
> >
>
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

