On 11/23/2011 06:47 AM, lucky7 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.

Hi lucky7,
This looks like one of those little obscurities that sometimes appear in the help files. The default for read.csv is header=TRUE and I guess that the "...header is set to TRUE..." part means that if your file has one less field in the first line, header will be forced to TRUE as this is a part of the CSV specification. As Douglas Adams might have said,

"Don't panic."

Jim

______________________________________________
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