[R] Read.csv
Petr Pikal
petr.pikal at precheza.cz
Thu Oct 26 10:02:28 CEST 2006
Hi
On 26 Oct 2006 at 10:31, Wang, Joshua (EQS) wrote:
Date sent: Thu, 26 Oct 2006 10:31:00 +0900
From: "Wang, Joshua (EQS)" <joshua.wang at gs.com>
To: "Murray Pung" <mcpung at gmail.com>
Copies to: r-help at stat.math.ethz.ch
Subject: Re: [R] Read.csv
> Mr. Pung,
>
> Thank you. It works in terms of loading the data. Except that there is
> a header in the file that I would like to load it to be the names in
> the data.frame.
You probably shall set row.names=NULL parameter in read.csv as stated
in help page
row.names a vector of row names. This can be a vector giving the
actual row names, or a single number giving the column of the table
which contains the row names, or character string giving the name of
the table column containing the row names.
If there is a header and the first row contains one fewer field than
the number of columns, the first column in the input is used for the
row names. Otherwise if row.names is missing, the rows are numbered.
Using row.names = NULL forces row numbering.
However you probably will always get some row numbering as it is an
attribute of data.frame.
HTH
Petr
>
> Regards,
> Josh
>
>
> ________________________________
>
> From: Murray Pung [mailto:mcpung at gmail.com]
> Sent: Thursday, October 26, 2006 10:26 AM
> To: Wang, Joshua (EQS)
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] Read.csv
>
>
> Try:
>
> read.csv("name.csv", header = F)
>
>
> On 26/10/06, Wang, Joshua (EQS) <joshua.wang at gs.com> wrote:
>
> Are there ways to load a csv file without row.names by
> read.csv? Thanks.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
>
>
>
>
> --
> Murray Pung
> Statistician, Datapharm Australia Pty Ltd
> 0404 273 283
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
Petr Pikal
petr.pikal at precheza.cz
More information about the R-help
mailing list