is.defined ... opposite of is.na
%crosses% ... english syntax for crosses a,b
guts <- function (x, ...) UseMethod("guts")
# adapted from utils:::head.data.frame
guts.data.frame <- function (x, n = 6L, ...)
{
stopifnot(length(n) == 1L)
n <- if (n < 0L)
max(nrow(x) + n, 0L)
else min(n, nrow(x))
ii <- sample(seq_len(x), n)
x[ii, , drop = FALSE]
}
#per Jim Rogers. In lieu of 'guts', perhaps: slice, chunk, torso, sample, etc.
Original issue reported on code.google.com by bergs...@gmail.com on 30 Jul 2012 at 7:16
Original issue reported on code.google.com by
bergs...@gmail.com
on 30 Jul 2012 at 7:16