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))

Try the Nmisc package in your browser

Any scripts or data that you put into this service are public.

Nmisc documentation built on April 28, 2021, 5:10 p.m.