Learn R Programming

sjmisc (version 2.8.10)

seq_col: Sequence generation for column or row counts of data frames

Description

seq_col(x) is a convenient wrapper for seq_len(ncol(x)), while seq_row(x) is a convenient wrapper for seq_len(nrow(x)).

Usage

seq_col(x)

seq_row(x)

Value

A numeric sequence from 1 to number of columns or rows.

Arguments

x

A data frame.

Examples

Run this code
data(iris)
seq_col(iris)
seq_row(iris)

Run the code above in your browser using DataLab