Re: [R] delete excel id automatically generated

From: Andrew Robinson <A.Robinson_at_ms.unimelb.edu.au>
Date: Wed, 04 May 2011 09:20:07 +1000

Try the function

rownames()

Andrew

On Tue, May 03, 2011 at 03:29:37AM -0700, agent dunham wrote:
> Dear community,
>
> I uploaded an excel with read.xls. My xls file actually have a column which
> is an id, ("plot" is the id) :
>
> plot height area
> 34 7.6 5.4
> 85 3.2 4.1
> 89 5.4 8.4
> 121 6.7 6.2
> ...
> 1325 2.1 1.5
>
> However R uses another id, this way:
>
> r id plot height area
> 1 34 7.6 5.4
> 2 85 3.2 4.1
> 3 89 5.4 8.4
> 4 121 6.7 6.2
> ...
> 314 1325 2.1 1.5
>
> I'd like that R used "plot" id because I delete some rows while studying
> regression, and R seems to be using the first id 1,2,3,4,...,314. Sometimes
> it's a mess to understand what R means in the plots when, for instance,
> states that data 200 is influential
>
> Thanks in advance, user_at_host.com
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/delete-excel-id-automatically-generated-tp3492147p3492147.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.

-- 
Andrew Robinson  
Program Manager, ACERA 
Department of Mathematics and Statistics            Tel: +61-3-8344-6410
University of Melbourne, VIC 3010 Australia               (prefer email)
http://www.ms.unimelb.edu.au/~andrewpr              Fax: +61-3-8344-4599
http://www.acera.unimelb.edu.au/

Forest Analytics with R (Springer, 2011) 
http://www.ms.unimelb.edu.au/FAwR/
Introduction to Scientific Programming and Simulation using R (CRC, 2009): 
http://www.ms.unimelb.edu.au/spuRs/

______________________________________________
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 Thu 05 May 2011 - 06:25:03 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 Thu 05 May 2011 - 07:00:05 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