R/corner.R

#' show the top-left corner of a data frame or matrix
#' 
#' \code{corner(x, n=5)}
#' 
#' @param \code{x} the name of the data frame or matrix
#' @param \code{n} the number of rows and columns to show
#' 
#' @details a simple function to show the top left corner of a data frame
#' or matrix saving a little on typing.
#' 
#' @examples
#' corner(mtcars, 6)

corner=function(x,n=5) x[1:n,1:n]
helophilus/ColsTools documentation built on May 30, 2019, 4:03 p.m.