head1: head1

View source: R/head1.R

head1R Documentation

head1

Description

Function to replicate the head() function from the 'utils' package, but with a default of returning only one row.

Usage

head1(x, n = 1)

Arguments

x

A vector, matrix, table, data frame or function.

n

The number of rows to return. Defaults to 1.

Examples

# Return one row
head1(mtcars)
# Return multiple rows
head1(x = mtcars, n = 3)


stpalan/SPTools documentation built on Aug. 21, 2023, 11:21 a.m.