SetIndex: SetIndex, ResetIndex

Description Usage Arguments Value Methods (by class)

View source: R/SetIndex.R

Description

Set index like python's DataFrame.set_index(,inplace=False) but works with data frames and character matrices

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
SetIndex(x, ...)

## Default S3 method:
SetIndex(x, index = colnames(x)[1])

## S3 method for class 'tbl_df'
SetIndex(x, ...)

ResetIndex(x, ...)

## S3 method for class 'data.frame'
ResetIndex(x, index = "index")

## S3 method for class 'matrix'
ResetIndex(x, ...)

Arguments

x

[data.frame or character matrix] table

index

[character] index number or name

Value

[data.frame or matrix]

Methods (by class)


stakahama/Rfunctools documentation built on June 8, 2021, 10:25 p.m.