read your file with readLines(). copy the first few lines for me to read
here

test <- readLines(yur filename)
test[1:5]

post the result. we can figure it out from there
On Apr 13, 2012 11:46 AM, "AMFTom" <the.quiet.r...@gmail.com> wrote:

> Dear Thierry,
>
> Thanks for your help. Now though, I try to import data from a txt file, and
> it says either
>
> > mydataframe <- read.table("Lv2.8.txt")
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
> :
>  line 3 did not have 15 elements
>
> or
>
> > mydataframe <- read.table("Lv2.8.txt", header = TRUE)
> Error in read.table("Lv2.8.txt", header = TRUE) :
>  more columns than column names
>
> even though I seem to have put a column name into the txt file for each
> column. Any ideas?
>
> Thanks again!
>
> Tom
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Help-Importing-data-from-txt-and-xlsx-files-tp4554622p4555001.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.
>

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to