first.element: Find the first element in a vector

View source: R/clanToolsFunctions.R

first.elementR Documentation

Find the first element in a vector

Description

This functions also handles NULL vectors and NA-values.

Usage

xx <- c(NA,1:100,NA)
first.element(xx)

Arguments

x

is the vector

na.ignore

controls if NA-values should be ignored

N

(default = 1) is the number of elements that should be returned

Value

The first element

Author(s)

Claus E. Andersen


claus-e-andersen/clanTools documentation built on Nov. 30, 2024, 11:06 p.m.