ez.reindex: reset the index of a data frame from 1...N

View source: R/frame.R

ez.reindexR Documentation

reset the index of a data frame from 1...N

Description

internally call row.names(df) <- NULL

Usage

ez.reindex(df)

Arguments

df

a data frame

Value

returns a new df

See Also

ez.rnames

Examples

occasionally, the index of a data frame could be broken, eg, after removing a row:
original row.names() is 1, 2, 3, then drop row 2
if not reindex, new index is 1, 3
if reindex, new index is 1, 2

jerryzhujian9/zmisc documentation built on March 9, 2024, 12:49 a.m.