From suharto_anggono at yahoo.com  Sat Feb  4 11:18:33 2017
From: suharto_anggono at yahoo.com (Suharto Anggono Suharto Anggono)
Date: Sat, 4 Feb 2017 10:18:33 +0000 (UTC)
Subject: [Rd] Lack of 'seq_len' in 'head' in 'stopifnot'
References: <2134429091.881467.1486203513831.ref@mail.yahoo.com>
Message-ID: <2134429091.881467.1486203513831@mail.yahoo.com>

Function 'stopifnot' in R devel r72104 has this.
    head <- function(x, n = 6L) ## basically utils:::head.default()
	x[if(n < 0L) max(length(x) + n, 0L) else min(n, length(x))]

If definition like utils:::head.default is intended, the index of 'x' should be wrapped in seq_len(...):
x[seq_len(...)]



[Rd] Lack of 'seq_len' in 'head' in 'stopifnot'
Suharto Anggono Suharto Anggono