Learn R Programming

discretes (version 0.1.0)

dsct_drop: Subset a numeric series

Description

Subset a numeric series

Usage

dsct_drop(
  x,
  from = -Inf,
  to = Inf,
  ...,
  include_from = TRUE,
  include_to = TRUE
)

dsct_keep( x, from = -Inf, to = Inf, ..., include_from = TRUE, include_to = TRUE )

Value

A numeric series representing the subset of discrete values within the specified range.

Arguments

x

Numeric series (numeric vector or object of class "discretes").

from, to

Numeric values defining the range to keep; single numerics with from <= to.

...

Reserved for future extensions; must be empty.

include_from, include_to

Logical values indicating whether the from and to values should be included in the kept range; single logicals.

Examples

Run this code
x <- integers(from = -3)
dsct_keep(x, from = -1.5, to = 2.5)
dsct_keep(x, to = 2)

Run the code above in your browser using DataLab