R/seq.R

Defines functions seq_ncol seq_nrow

Documented in seq_ncol seq_nrow

#' Creates a sequence based on the number of rows or columns
#' 
#' Creates a sequence from 1 to the number of row or columns, respectively.
#' 
#' @param x a data frame or a matrix
#' 
#' @return a vector of integers
#' 
#' @seealso \code{\link{seq}}
#' 
#' @export
seq_nrow <- function(x) seq_len(nrow(x))


#' @export
#' @rdname seq_nrow
seq_ncol <- function(x) seq_len(ncol(x))
numeract/Nmisc documentation built on April 29, 2021, 9:56 a.m.