split.feat: Split features by length

Description Usage Arguments Value Author(s)

View source: R/feat.R

Description

Split features by length

Usage

1
2
3
## S3 method for class 'feat'
split(x, f, drop = FALSE, start.from = "left",
  pointer.only = FALSE, ...)

Arguments

x

An object of type feat

f

The maximum length of features in new object. Can be a vector giving a different length for each row, or a single numeric value. Values will be recycled to the same length as nrow.feat(x).

drop

A logical value saying whether to drop "left-over" elements which do not have exactly length f.

start.from

A character string, current valid values are "left" (start split at smallest coordinate for each feature), or "right" (start splitting at the last coordinate and work down). Values will be recycled to the length of nrow.feat(x)

pointer.only

If TRUE, return an object which is a pointer to a features object stored in C (advanced use only).

...

Currently not used (for S3 compatibility).

Value

An object of type feat with the same features as x but with all features of length > max.length broken into segments (starting from the first position in feature). The last piece of each split segment may be smaller than max.length

Author(s)

Melissa J. Hubisz


rphast documentation built on May 1, 2019, 9:26 p.m.