
Last chance! 50% off unlimited learning
Sale ends in
discrete
creates a discrete vector which is distinct from a
continuous vector, or a factor/ordered vector.
The other function are tools for manipulating descrete vectors.
as.discrete(x, ...)
"as.discrete"(x, ...)
discrete(x, levels = sort(unique.default(x), na.last = TRUE), exclude = NA)
"["(x, ...) <- value
"["(x, ..., drop = FALSE)
"[["(x, i)
is.discrete(x)
"is.na"(x) <- value
"length"(x) <- value
NA
be excluded. NA
as.discrete
, discrete
returns a vector of
discrete
type.is.discrete
returan logical TRUE
if the vector is of
class discrete other wise it returns FALSE
.
as.discrete
converts a vector into a discrete vector. discrete
creates a discrete vector from provided values.
is.discrete
tests to see if the vector is a discrete vector.
[[
, [
, factor
a <- discrete(1:25)
a
is.discrete(a)
b <- as.discrete(2:4)
b
Run the code above in your browser using DataLab