Re: [R] altering identity column

From: Peter Ehlers <ehlers_at_ucalgary.ca>
Date: Mon, 18 Apr 2011 09:37:26 -0700

On 2011-04-18 06:15, Ben Bolker wrote:
> Bodnar Laszlo EB_HU<Laszlo.Bodnar<at> erstebank.hu> writes:
>
>> [snip snip ]
>
>> So I have a transformed dataframe now including 10,000 obeservations
>> (from 60,001 - to 70,000) and if you send
>> "head(transformed_dataframe)" into R it looks like this:
>
> [snip]>
>
>> Now is there a quick way to alter this indexing of rows in case of
>> my "transformed_dataframe"? I mean, I would
>
>
> rownames(newdata)<- 1:nrow(newdata)

or, perhaps a bit simpler

  rownames(newdata) <- NULL

Peter Ehlers



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 18 Apr 2011 - 16:44:43 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 Mon 18 Apr 2011 - 16:50:31 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