Learn R Programming

rowr (version 1.1.3)

rows: Allows row indexing without knowledge of dimensionality or class.

Description

Allows row indexing without knowledge of dimensionality or class.

Usage

rows(data, rownums)

Arguments

data
any R object
rownums
indices of target rows

Examples

Run this code
rows(c('A','B','C'),c(1,3))
rows(list('A','B','C'),c(1,3))
df<-data.frame(a=c(1,2,3),b=c(1,2,3))
rows(df,3)

Run the code above in your browser using DataLab