Factor/ordered factor S3 class
new_factor(x = integer(), levels = character(), ..., class = character()) new_ordered(x = integer(), levels = character()) ## S3 method for class 'factor' vec_ptype2(x, y, ...) ## S3 method for class 'ordered' vec_ptype2(x, y, ...) ## S3 method for class 'factor' vec_cast(x, to, ...) ## S3 method for class 'ordered' vec_cast(x, to, ...)
x |
Integer values which index in to |
levels |
Character vector of labels. |
..., class |
Used to for subclasses. |
These functions help the base factor and ordered factor classes fit in to
the vctrs type system by providing constructors, coercion functions,
and casting functions. new_factor()
and new_ordered()
are low-level
constructors - they only check that types, but not values, are valid, so
are for expert use only.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.