Re: [R] Re ad Table

From: jim holtman <jholtman_at_gmail.com>
Date: Mon, 30 Jun 2008 18:45:40 -0400

Your sample works just fine:

> x <- read.table(textConnection("Name Heigth

+ W1     22
+ W2     45"), header=TRUE, row.names=1)

> closeAllConnections()
>
> x

   Heigth

W1     22
W2     45

>

Take a look at your data file. You might have some lines with a different number of fields.

On Mon, Jun 30, 2008 at 12:27 PM, HansImGlŘck <vikunja_at_gmx.net> wrote:
>
> Hi all,
>
> I have a problem with the function "read.table"
>
> I have a text file wich I want to analyse in R
>
> Example:
> Name Heigth
> W1 22
> W2 45
>
> Expression:
>> parameters.W.df <- read.table("parameters.W.txt", header=TRUE,
>> row.names=1)
>
> What I get back:
> Error in scan, line 1 has not 11 elements
>
> What should I try to slove the problem?
>
> Thanks
>
> --
> View this message in context: http://www.nabble.com/Read-Table-tp18199273p18199273.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>

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

What is the problem you are trying to solve?

______________________________________________
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 30 Jun 2008 - 22:49:57 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 Tue 01 Jul 2008 - 01:31:04 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