a   b
A 1  2
B 3  4
C 5  6

The assumption above is that the rownames don't have a header and
the columns do.  Therefore the default is header=TRUE.

 r a   b
A 1  2
B 3  4
C 5  6

In the second example, the first column is called "r" and it is not
clear whether that is a column with a variable or a rowname.
Therefore the default is header=FALSE.



On Tue, Nov 22, 2011 at 2:47 PM, lucky7 <wokeliandehotm...@gmail.com> wrote:

> Hi,
>
> I just start to use R today! I am reading the R Help on read.csv and the
> description for header says "header is set to TRUE if and only if the first
> row contains one fewer field than the number of columns". Why is that? My
> data has the same number of fields in the first row as the number of
> columns. I mean I have no problem opening my csv file I am just curious why
> it should be one fewer.
>
> Thanks!
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Header-T-tp4097045p4097045.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.
>

        [[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