Learn R Programming

mosaicCore (version 0.9.0)

columns: return a vector of row or column indices

Description

return a vector of row or column indices

Usage

columns(x, default = c())

rows(x, default = c())

Value

if x has rows or columns, a vector of indices, else default

Arguments

x

an object that may or may not have any rows or columns

default

what to return if there are no rows or columns

Examples

Run this code
dim(iris)
columns(iris)
rows(iris)
columns(NULL)
columns("this doesn't have columns")

Run the code above in your browser using DataLab